Skip to content

Commit

Permalink
Merge pull request #18675 from jakesmith/HPCC-31873-packagemap-dotsco…
Browse files Browse the repository at this point in the history
…pe-issue

HPCC-31873 Suppress root scope (.::) from expanded logical files.

Reviewed-by: Gavin Halliday <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored May 17, 2024
2 parents 6e81bfb + b955eb7 commit 8b94768
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions common/thorhelper/roxiehelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions dali/base/dautils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion dali/base/dautils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8b94768

Please sign in to comment.