I vaguely remember that inside code, like when calling 'open()' on a file, Windows handles /forward/slash/paths just fine, as it does handle c:\those\backslash\paths. But a path that combines / and \ might be problematic.
If you manually set
epicsEnvSet FOO "C:\Users\nobody\AppData\Roaming/foobar"
does that actually work?
Or are the macro issues just part of the problem, the combined / and \ will be the next one?
Would a better workaround in this case be to define %APPDATA% with forward slashes?
Or in case %APPDATA% is some predefined variable, introduce your own variable?
---
Under Windows, using system environment variables containing paths in the iocShell doesn't work, because backslash characters (\) in the path are interpreted as the first character of an escape sequence.
Example. Trying to set a location inside %AppData% by doing
epicsEnvSet FOO ${APPDATA}/foobar
creates an invalid path, because the backslashes disappear:
C:UsersnobodyAppDataRoaming/foobar
Shouldn't backslashes rather be treated verbatim here?
The expansion is done by macLib before the epicsEnvSet command is being called. Do we need a modifier that allows verbatim macro replacement? The getenv() used by macLib converts '\' to '\\' when reading from the environment, but macLib seems to resolve (discard) the "escape sequence" further down in the process.
- Replies:
- Re: [EXTERNAL] Windows paths inside iocShell Ralph Lange via Core-talk
- References:
- Windows paths inside iocShell Ralph Lange via Core-talk
- Navigate by Date:
- Prev:
Build failed in Jenkins: epics-example-linux32 #865 APS Jenkins via Core-talk
- Next:
Build failed in Jenkins: epics-example #727 APS Jenkins via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Windows paths inside iocShell Ralph Lange via Core-talk
- Next:
Re: [EXTERNAL] Windows paths inside iocShell Ralph Lange via Core-talk
- Index:
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|