Skip to content

Commit

Permalink
fix #6391
Browse files Browse the repository at this point in the history
  • Loading branch information
rtri committed Jul 4, 2020
1 parent a68839a commit 6e34264
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rts/System/FileSystem/VFSHandler.cpp
Expand Up @@ -145,11 +145,16 @@ bool CVFSHandler::AddArchive(const std::string& archiveName, bool overwrite)
assert(!archivePath.empty());
assert(rawSection < Section::Count);

// populate files from stashed archive if possible
// populate files from stashed archive if possible, but
// exclude directory archives which should only ever be
// used for development purposes anyway
IArchive* ar = archives[tmpSection][archivePath];

LOG_L(L_INFO, "[%s::%s<this=%p>(arName=\"%s\", overwrite=%s)] section=%d cached=%d", vfsName, __func__, this, archiveName.c_str(), overwrite ? "true" : "false", rawSection, ar != nullptr);

if (ar != nullptr && ar->GetType() == ARCHIVE_TYPE_SDD)
spring::SafeDelete(ar);

if (ar == nullptr) {
archives[tmpSection].erase(archivePath);

Expand Down

0 comments on commit 6e34264

Please sign in to comment.