mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-22 23:26:11 -08:00
Add umask and rename compatibility wrappers for Windows
umask() doesn't exist on Windows and is thus a no-op. rename() only works if the destination doesn't already exist, so we must unlink before renaming.
This commit is contained in:
committed by
Andrew Ayer
parent
dcea03f0d7
commit
df2b472cd9
3
util.hpp
3
util.hpp
@@ -35,6 +35,7 @@
|
||||
#include <ios>
|
||||
#include <iosfwd>
|
||||
#include <stdint.h>
|
||||
#include <sys/types.h>
|
||||
#include <fstream>
|
||||
#include <vector>
|
||||
|
||||
@@ -69,6 +70,8 @@ void store_be32 (unsigned char*, uint32_t);
|
||||
bool read_be32 (std::istream& in, uint32_t&);
|
||||
void write_be32 (std::ostream& out, uint32_t);
|
||||
void init_std_streams ();
|
||||
mode_t util_umask (mode_t);
|
||||
int util_rename (const char*, const char*);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user