Compare commits
2 Commits
56c367a3c4
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7d21ffa1ee | |||
| 259fe53aff |
+5
-3
@@ -53,14 +53,16 @@ FileSink::FileSink(AbsPathView filepath, Mode mode, Flags flags) noexcept
|
|||||||
{
|
{
|
||||||
case Mode::CreateOrOpen:
|
case Mode::CreateOrOpen:
|
||||||
fmode |= fast_io::open_mode::creat;
|
fmode |= fast_io::open_mode::creat;
|
||||||
// fall through
|
break;
|
||||||
case Mode::Open:
|
case Mode::Open:
|
||||||
break;
|
break;
|
||||||
case Mode::CreateOrOpenAndClear:
|
case Mode::CreateOrOpenAndClear:
|
||||||
fmode |= fast_io::open_mode::creat;
|
//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
|
||||||
// fall through
|
fmode |= fast_io::open_mode::trunc;
|
||||||
|
break;
|
||||||
case Mode::OpenAndClear:
|
case Mode::OpenAndClear:
|
||||||
fmode |= fast_io::open_mode::trunc;
|
fmode |= fast_io::open_mode::trunc;
|
||||||
|
fmode |= fast_io::open_mode::excl;
|
||||||
break;
|
break;
|
||||||
case Mode::CreateIfNew:
|
case Mode::CreateIfNew:
|
||||||
fmode |= fast_io::open_mode::creat;
|
fmode |= fast_io::open_mode::creat;
|
||||||
|
|||||||
@@ -36,6 +36,13 @@ void my_zip_close(zip* file)
|
|||||||
fs_zip_close(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 computePersistentHash(AbsPathView path)
|
||||||
{
|
{
|
||||||
uint64_t hash = 0;
|
uint64_t hash = 0;
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
#include "fs/WritableFolderPack.h"
|
#include "fs/WritableFolderPack.h"
|
||||||
#include "fs/CopyStream.h"
|
#include "fs/CopyStream.h"
|
||||||
#include "fs/zip/ZipWriter.h"
|
#include "fs/zip/ZipWriter.h"
|
||||||
#include "fs/zip/DeflateFileWriter.h"
|
|
||||||
|
|
||||||
namespace fs
|
namespace fs
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user