![]() |
Default working directory for FRCUserProgram process?
Hello,
Recently, I got a program crash because the text file that was supposed to be loaded by AutomonousInit (C++ - iterative robot) could not be found. The file was placed in /home/lvuser alongside the binary FRCUserProgram, so I expected a call like fopen("foo.txt","r") to work but it didn't. fopen("/home/lvuser/foo.txt","r") did work however, so it's not a permission issue. Also tried to put the file in "/home/admin" in case FRCUserProgram would run as admin, without success. Anybody knows what the default working directory is? "/", maybe? |
Re: Default working directory for FRCUserProgram process?
|
Re: Default working directory for FRCUserProgram process?
Indeed, got it with getcwd (thanks for the tip):
/usr/local/natinst/labview Not especially intuitive... |
Re: Default working directory for FRCUserProgram process?
Quote:
|
Re: Default working directory for FRCUserProgram process?
We ran into a similar issue. Our findings indicated that the working directory was different when running while debugging and running when deployed. The quick fix for us was to use the entire path: /home/lvuser/Encoder_Offsets.txt.
|
| All times are GMT -5. The time now is 10:44 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi