diff --git a/common/thorhelper/roxiehelper.cpp b/common/thorhelper/roxiehelper.cpp index d2425799277..5ccf4c06c82 100644 --- a/common/thorhelper/roxiehelper.cpp +++ b/common/thorhelper/roxiehelper.cpp @@ -2766,7 +2766,7 @@ StringBuffer & expandLogicalFilename(StringBuffer & logicalName, const char * fn CDfsLogicalFileName dlfn; dlfn.setAllowWild(true); dlfn.setAllowTrailingEmptyScope(true); - dlfn.set(fname+1); + dlfn.set(fname+1, false, true); logicalName.append(dlfn.get(ignoreForeignPrefix)); } else if (resolveLocally) @@ -2792,7 +2792,7 @@ StringBuffer & expandLogicalFilename(StringBuffer & logicalName, const char * fn CDfsLogicalFileName dlfn; dlfn.setAllowWild(true); dlfn.setAllowTrailingEmptyScope(true); - dlfn.set(lfn.str()); + dlfn.set(lfn.str(), false, true); logicalName.append(dlfn.get()); } return logicalName; diff --git a/dali/base/dautils.cpp b/dali/base/dautils.cpp index b69e5a1e917..622e28e3a92 100644 --- a/dali/base/dautils.cpp +++ b/dali/base/dautils.cpp @@ -873,7 +873,7 @@ bool CDfsLogicalFileName::normalizeExternal(const char * name, StringAttr &res, return true; } -void CDfsLogicalFileName::set(const char *name, bool removeForeign) +void CDfsLogicalFileName::set(const char *name, bool removeForeign, bool skipAddRootScopeIfNone) { clear(); if (!name) @@ -919,7 +919,7 @@ void CDfsLogicalFileName::set(const char *name, bool removeForeign) external = true; else { - normalizeName(name, lfn, false, true); + normalizeName(name, lfn, false, !skipAddRootScopeIfNone); if (removeForeign) { StringAttr _lfn = get(true); diff --git a/dali/base/dautils.hpp b/dali/base/dautils.hpp index a18c3542996..79d4cf599cb 100644 --- a/dali/base/dautils.hpp +++ b/dali/base/dautils.hpp @@ -71,7 +71,7 @@ class da_decl CDfsLogicalFileName ~CDfsLogicalFileName(); CDfsLogicalFileName & operator = (CDfsLogicalFileName const &from); - void set(const char *lfn, bool removeForeign=false); // throws an exception on invalid filenames + void set(const char *lfn, bool removeForeign=false, bool skipAddRootScopeIfNone=false); // throws an exception on invalid filenames bool setValidate(const char *lfn, bool removeForeign=false); // returns false for invalid filenames void set(const CDfsLogicalFileName &lfn); void set(const char *scopes,const char *tail);