Skip to content
  • Mark OLESEN's avatar
    ENH: make cwd() behaviour user-adjustable (issue #1007) · b7054272
    Mark OLESEN authored
    - with the 'cwd' optimization switch it is possible to select the
      preferred behaviour for the cwd() function.
    
      A value of 0 causes cwd() to return the physical directory,
      which is what getcwd() and `pwd -P` return.
      Until now, this was always the standard behaviour.
    
      With a value of 1, cwd() instead returns the logical directory,
      which what $PWD contains and `pwd -L` returns.
      If any of the sanity checks fail (eg, PWD points to something other
      than ".", etc), a warning is emitted and the physical cwd() is
      returned instead.
    
      Apart from the optical difference in the output, this additional
      control helps workaround file systems with whitespace or other
      characters in the directory that normally cause OpenFOAM to balk.
      Using a cleaner symlink elsewhere should skirt this issue.
    
      Eg,
          cd $HOME
          ln -s "/mounted volume/user/workdir"  workdir
          cd workdir
          # start working with OpenFOAM
    b7054272