#605: Simfactory does not find the right 'path' for symlinked cactus directories -------------------------+-------------------------------------------------- Reporter: knarf | Owner: eschnett Type: defect | Status: review Priority: minor | Milestone: ET_2011_10 Component: SimFactory | Version: development version Resolution: | Keywords: -------------------------+--------------------------------------------------
Comment (by knarf):
I thought about that. Unfortunately, the PWD solution has the problem that PWD isn't updated when chdir() is called within simfactory. This is usually fine for the Cactus source dir, since that is asked for at the very start of commands. Using PWD in general would require to write a wrapper for chdir() and to consistently use it.
I didn't find a better way to implement this, despite some people having the same problem on the web. The system call pwd() will dereference symlinks no matter what - that is the standard. The other way to get to the symlink-path is using the environment, but python doesn't update that when it changes directories, so os.environ.get("PWD") might actually not point to the current directory.