|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
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? |
|
#2
|
|||||
|
|||||
|
Re: Default working directory for FRCUserProgram process?
|
|
#3
|
|||
|
|||
|
Re: Default working directory for FRCUserProgram process?
Indeed, got it with getcwd (thanks for the tip):
/usr/local/natinst/labview Not especially intuitive... |
|
#4
|
|||
|
|||
|
Re: Default working directory for FRCUserProgram process?
Quote:
|
|
#5
|
||||
|
||||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|