diff --git a/src/file_entry.cpp b/src/file_entry.cpp index 8d870369725b10bbdbd3e8a7d703f9d6765b2875..6083decf7e68280aaf0fa8f1337512fcb1bd8eae 100644 --- a/src/file_entry.cpp +++ b/src/file_entry.cpp @@ -297,6 +297,9 @@ bool FileEntry::IsIgnore(const string &filename) const bool FileEntry::RemoveAllDirInner(const FileEntry &entry) { string path = entry.GetFilePath().GetPath(); + if (!Exist(path)) { + return true; + } if (entry.IsFile()) { #ifdef _WIN32 bool result = remove(AdaptLongPath(path).c_str()) == 0; diff --git a/src/resource_append.cpp b/src/resource_append.cpp index e1f7bbd55287cd0199f4e4fac03dd8a38c5153c2..08ed0ccf2c8575ab51d6d3f465b9ea8612426624 100644 --- a/src/resource_append.cpp +++ b/src/resource_append.cpp @@ -90,7 +90,12 @@ bool ResourceAppend::Combine(const string &folderPath) .FormatCause(child->GetFilePath().GetPath().c_str(), "not a file")); return false; } - if (child->GetFilePath().GetFilename() == ID_DEFINED_FILE) { + const std::string fileName = child->GetFilePath().GetFilename(); + if (fileName == ID_DEFINED_FILE) { + continue; + } + if (fileName.find('.') == 0) { + // The file starts with '.' is invalid continue; } if (!LoadResourceItem(child->GetFilePath().GetPath())) {