Commit aa969ec1 authored by mattijs's avatar mattijs
Browse files

BUG: IOobject: interpretation of ./ in construct-from-fileName. Fixes #482.

parent 9161c228
......@@ -121,12 +121,16 @@ static inline bool isOutsideOfCase(const std::string& file)
// "/xxx/yyy/bar" ("/xxx/yyy", "", "bar")
bool Foam::IOobject::fileNameComponents
(
const fileName& path,
const fileName& rawPath,
fileName& instance,
fileName& local,
word& name
)
{
// Re-interpret the path as a file-system path.
fileName path(rawPath);
path.toAbsolute();
instance.clear();
local.clear();
name.clear();
......
......@@ -239,8 +239,10 @@ public:
bool globalObject = false
);
//- Construct from path, registry, io options
// Uses fileNameComponents() to split path into components.
//- Construct from path, registry, io options.
// Uses fileNameComponents() to split path into components. The
// path argument is regarded as a file system path, not a case-relative
// path. Any './' gets expanded to the current working directory.
IOobject
(
const fileName& path,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment