diff --git a/dali/base/dautils.hpp b/dali/base/dautils.hpp index 5ea1f8b447c..d42b78fe0bd 100644 --- a/dali/base/dautils.hpp +++ b/dali/base/dautils.hpp @@ -448,6 +448,7 @@ interface ILocalOrDistributedFile: extends IInterface virtual bool getPartCrc(unsigned partnum, unsigned &crc) = 0; virtual bool exists() const = 0; // if created for writing, this may be false virtual bool isExternal() const = 0; + virtual bool isExternalFile() const = 0; }; typedef __int64 ConnectionId; diff --git a/ecl/hthor/hthor.cpp b/ecl/hthor/hthor.cpp index c80fcd65e44..66c47fd80b3 100644 --- a/ecl/hthor/hthor.cpp +++ b/ecl/hthor/hthor.cpp @@ -490,7 +490,7 @@ void CHThorDiskWriteActivity::resolve() else throw MakeStringException(99, "Cannot write %s, file already exists (missing OVERWRITE attribute?)", lfn.str()); } - else if (f->exists() || f->isExternal() || agent.queryResolveFilesLocally()) + else if (f->exists() || f->isExternalFile() || agent.queryResolveFilesLocally()) { // special/local/external file if (f->numParts()!=1) @@ -8370,7 +8370,7 @@ void CHThorDiskReadBaseActivity::resolve() Owned fdesc; fdesc.setown(ldFile->getFileDescriptor()); gatherInfo(fdesc); - if (ldFile->isExternal()) + if (ldFile->isExternalFile()) compressed = checkWriteIsCompressed(helper.getFlags(), fixedDiskRecordSize, false);//grouped=FALSE because fixedDiskRecordSize already includes grouped IDistributedFile *dFile = ldFile->queryDistributedFile(); if (dFile) //only makes sense for distributed (non local) files diff --git a/esp/clients/ws_dfsclient/ws_dfsclient.cpp b/esp/clients/ws_dfsclient/ws_dfsclient.cpp index 59df048c19d..6905c574e74 100644 --- a/esp/clients/ws_dfsclient/ws_dfsclient.cpp +++ b/esp/clients/ws_dfsclient/ws_dfsclient.cpp @@ -920,7 +920,7 @@ class CLocalOrDistributedFile: implements ILocalOrDistributedFile, public CInter } if (!onlylocal) { - if (lfn.isExternal() && !lfn.isRemote()) + if (lfn.isExternalFile() || lfn.isExternalPlane()) { Owned fDesc = createExternalFileDescriptor(lfn.get()); dfile.setown(queryDistributedFileDirectory().createExternal(fDesc, lfn.get())); @@ -1126,6 +1126,11 @@ class CLocalOrDistributedFile: implements ILocalOrDistributedFile, public CInter { return lfn.isExternal(); } + + virtual bool isExternalFile() const override + { + return lfn.isExternalFile() || lfn.isExternalPlane(); + } };