diff options
author | James McCoy <jamessan@jamessan.com> | 2017-01-09 20:20:03 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-09 20:20:03 -0500 |
commit | b260004d65ab55838cce9442a29e4f10941c5f51 (patch) | |
tree | d9c417619471ad3bce0d1e5cf6d3db13bb4dd04d /src | |
parent | 94101987a57014e57ed811ab37061e59b42287d9 (diff) | |
parent | bfb5180627fb1ac88780d775fb975f84459cb752 (diff) | |
download | rneovim-b260004d65ab55838cce9442a29e4f10941c5f51.tar.gz rneovim-b260004d65ab55838cce9442a29e4f10941c5f51.tar.bz2 rneovim-b260004d65ab55838cce9442a29e4f10941c5f51.zip |
Merge pull request #5860 from jamessan/vim-7.4.1889
vim-patch:7.4.1889
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/fileio.c | 6 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index bbfa56dfbf..29114201d2 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -51,6 +51,7 @@ #include "nvim/window.h" #include "nvim/shada.h" #include "nvim/os/os.h" +#include "nvim/os/os_defs.h" #include "nvim/os/time.h" #include "nvim/os/input.h" @@ -5224,6 +5225,10 @@ static void vim_maketempdir(void) // Try the entries in `TEMP_DIR_NAMES` to create the temp directory. char_u template[TEMP_FILE_PATH_MAXLEN]; char_u path[TEMP_FILE_PATH_MAXLEN]; + + // Make sure the umask doesn't remove the executable bit. + // "repl" has been reported to use "0177". + mode_t umask_save = umask(0077); for (size_t i = 0; i < ARRAY_SIZE(temp_dirs); i++) { // Expand environment variables, leave room for "/nvimXXXXXX/999999999" expand_env((char_u *)temp_dirs[i], template, TEMP_FILE_PATH_MAXLEN - 22); @@ -5247,6 +5252,7 @@ static void vim_maketempdir(void) os_rmdir((char *)path); } } + (void)umask(umask_save); } /// Delete "name" and everything in it, recursively. diff --git a/src/nvim/version.c b/src/nvim/version.c index 19062be730..359255caee 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -551,7 +551,7 @@ static int included_patches[] = { 1892, // 1891 NA // 1890 NA - // 1889, + 1889, // 1888 NA // 1887 NA // 1886 NA |