Skip to content

Commit

Permalink
When rename fails - do not try to chmod
Browse files Browse the repository at this point in the history
  • Loading branch information
kpumuk committed Apr 2, 2019
1 parent a40a1a1 commit a66138b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ext/bootsnap/bootsnap.c
Expand Up @@ -521,6 +521,7 @@ atomic_write_cache_file(char * path, struct bs_cache_key * key, VALUE data, char
ret = rename(tmp_path, path);
if (ret < 0) {
*errno_provenance = (char *)"bs_fetch:atomic_write_cache_file:rename";
return -1;
}
ret = chmod(path, 0664 & ~current_umask);
if (ret < 0) {
Expand Down

0 comments on commit a66138b

Please sign in to comment.