-
Klaus Aehlig authored
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>
0c09ecc2