I know. Heresy. But I\'m in a bind. I have a lot of config files that use absolute path names, which creates an incompatibility between OS X and Windows. If I can get OS X (
Honestly, don't hard-code absolute paths in a program, even for a single-platform app. Do the correct thing.
The following is my wrong solution, saved to remind myself not to repeat giving a misdirected advice ... shame on me.
Just create a symbolic link named Q:
just at the root directory /
to /
itself.
$ cd /
$ ln -s / Q:
$ ln -s / S:
You might need to use sudo
. Then, at the start of your program, just chdir
to /
.
If you don't want Q:
and S:
to show up in the Finder, perform
$ /Developer/Tools/SetFile -P -a V Q:
$ /Developer/Tools/SetFile -P -a V S:
which set the invisible-to-the-Finder bit of the files.