ENH: allow space char in fileName is now configurable (#1008)
- having whitespace in fileName can be somewhat fragile since it means that the fileName components do not necessarily correspond to a 'Foam::word'. But in many cases it will work provided that spaces are not present in the final portion of the simulation directory itself. InfoSwitches { // Allow space character in fileName (use with caution) allowSpaceInFileName 0; } - now use doClean=true as default for fileName::validate(). Was false. Unlike fileName::clean() this requires no internal string rewrite since the characters are being copied. Also handle any path separator transformations (ie, backslash => forward slash) at the same time. This makes it resemble the std::filesystem a bit more.
Showing
- applications/test/fileNameOS/Make/files 3 additions, 0 deletionsapplications/test/fileNameOS/Make/files
- applications/test/fileNameOS/Make/options 2 additions, 0 deletionsapplications/test/fileNameOS/Make/options
- applications/test/fileNameOS/Test-fileNameOS.C 106 additions, 0 deletionsapplications/test/fileNameOS/Test-fileNameOS.C
- etc/controlDict 3 additions, 0 deletionsetc/controlDict
- src/OpenFOAM/global/argList/argList.C 1 addition, 1 deletionsrc/OpenFOAM/global/argList/argList.C
- src/OpenFOAM/primitives/chars/char/char.H 13 additions, 4 deletionssrc/OpenFOAM/primitives/chars/char/char.H
- src/OpenFOAM/primitives/chars/char/charIO.C 5 additions, 5 deletionssrc/OpenFOAM/primitives/chars/char/charIO.C
- src/OpenFOAM/primitives/strings/fileName/fileName.C 19 additions, 4 deletionssrc/OpenFOAM/primitives/strings/fileName/fileName.C
- src/OpenFOAM/primitives/strings/fileName/fileName.H 7 additions, 8 deletionssrc/OpenFOAM/primitives/strings/fileName/fileName.H
- src/OpenFOAM/primitives/strings/fileName/fileNameI.H 7 additions, 4 deletionssrc/OpenFOAM/primitives/strings/fileName/fileNameI.H
Please register or sign in to comment