Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
4248fdcd
Commit
4248fdcd
authored
Jun 22, 2020
by
Mark OLESEN
Browse files
BUG: windows IOobject::path() incorrect from absolute (fixes
#1738
)
- only checked if it started with '/' and not 'd:/' (for example).
parent
8f8617a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/db/IOobject/IOobject.C
View file @
4248fdcd
...
...
@@ -456,10 +456,19 @@ const Foam::fileName& Foam::IOobject::caseName() const
Foam
::
fileName
Foam
::
IOobject
::
path
()
const
{
// A file is 'outside' of the case if it has been specified using an
// absolute path
(starts with '/')
// absolute path
if
(
instance
().
starts_with
(
'/'
))
const
auto
first
=
instance
().
find
(
'/'
);
if
(
first
==
0
#ifdef _WIN32
||
(
first
==
2
&&
instance
()[
1
]
==
':'
)
// Eg, d:/path
#endif
)
{
// Absolute path (starts with '/' or 'd:/')
return
instance
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment