Fix bug 65685

This commit is contained in:
Oleg Korshul
2024-01-11 13:56:45 +03:00
parent 5d4f785cc1
commit 759d5e3ee9
2 changed files with 3 additions and 2 deletions

View File

@ -408,7 +408,8 @@ public:
}
virtual bool exists(const std::wstring& path)
{
return NSFile::CFileBinary::Exists(getFullFilePath(path));
std::wstring full = getFullFilePath(path);
return NSFile::CFileBinary::Exists(full) && !NSDirectory::Exists(full);
}
virtual void remove(const std::wstring& path)
{

View File

@ -74,7 +74,7 @@ namespace XPS
// Нужно подменить первые 32 байта файла
if (IFolder::iftFolder == pFolder->getType())
{
if (!NSFile::CFileBinary::Exists(wsFontPath) && NSDirectory::Exists(wsFontPath))
if (NSDirectory::Exists(wsFontPath))
{
IFolder::CBuffer* buffer = NULL;;
pFolder->readFileWithChunks(wsFontPath, buffer);