Compare commits

..

2 Commits

Author SHA1 Message Date
jeanlemotan 7d21ffa1ee Work around a bug in fast_io 2024-09-08 16:09:16 +02:00
catalinvasile 259fe53aff Fixed compile error 2024-09-05 17:08:23 +02:00
3 changed files with 12 additions and 4 deletions
+5 -3
View File
@@ -53,14 +53,16 @@ FileSink::FileSink(AbsPathView filepath, Mode mode, Flags flags) noexcept
{
case Mode::CreateOrOpen:
fmode |= fast_io::open_mode::creat;
// fall through
break;
case Mode::Open:
break;
case Mode::CreateOrOpenAndClear:
fmode |= fast_io::open_mode::creat;
// fall through
//fmode |= fast_io::open_mode::creat; //cannot pass this, seems like a bug in fast_io. If it's passed, the mode reverts to OPEN_ALWAYS
fmode |= fast_io::open_mode::trunc;
break;
case Mode::OpenAndClear:
fmode |= fast_io::open_mode::trunc;
fmode |= fast_io::open_mode::excl;
break;
case Mode::CreateIfNew:
fmode |= fast_io::open_mode::creat;
+7
View File
@@ -36,6 +36,13 @@ void my_zip_close(zip* file)
fs_zip_close(file);
}
uint64_t computePersistentHash(const AbsPath& path)
{
uint64_t hash = 0;
for (const tl::string& e : path)
tl::hash_and_combine(hash, e);
return hash;
}
uint64_t computePersistentHash(AbsPathView path)
{
uint64_t hash = 0;
-1
View File
@@ -5,7 +5,6 @@
#include "fs/WritableFolderPack.h"
#include "fs/CopyStream.h"
#include "fs/zip/ZipWriter.h"
#include "fs/zip/DeflateFileWriter.h"
namespace fs
{