Files
git-crypt/key.cpp
Andrew Ayer 47e810d592 Write and use create_protected_file() helper
Instead of using umask to ensure sensitive files are created with
restrictive permissions, git-crypt now does:

	create_protected_file(filename);
	std::ofstream out(filename);
	// ...

create_protected_file can have different Unix and Windows implementations.
create_protected_file should be easier to implement on Windows than a
umask equivalent, and this pattern keeps the amount of platform-specific
code to a minimum and avoids #ifdefs.
2014-08-02 21:18:28 -07:00

7.7 KiB