Revision 0c09ecc2
ID | 0c09ecc2652b6bbfe1b7b0f68b0597a8e2886251 |
Make safeRenameFile create dirs with defined permissions
If, and only if, safeRenameFile creates a new directory, make sure
it has well defined permissions. While there, also optimize for the
common case. The main use of safeRenameFile is archiving jobs. As
we store them in directories of 10000 jobs each, in 99.99% of all
calls, the directory will already exist. So first try the rename
directly, and only if that fails, try creating the directory.
Signed-off-by: Klaus Aehlig <aehlig@google.com>
Reviewed-by: Petr Pudlak <pudlak@google.com>
Files
- added
- modified
- copied
- renamed
- deleted