aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2025-03-12 06:46:45 +0800
committerGitHub <noreply@github.com>2025-03-11 22:46:45 +0000
commitbcafbc3f7b43ed2b773a539db8f7c0230d712014 (patch)
treed5d553f66e58ef2ecd3140cbc74eea0efad8546e
parent6b8c56c7f6dae922d874b34ca95d0e7ff2496944 (diff)
downloadrneovim-bcafbc3f7b43ed2b773a539db8f7c0230d712014.tar.gz
rneovim-bcafbc3f7b43ed2b773a539db8f7c0230d712014.tar.bz2
rneovim-bcafbc3f7b43ed2b773a539db8f7c0230d712014.zip
vim-patch:0a336cc: runtime(doc): clarify that a umask is applied to mkdir() (#32845)
fixes: vim/vim#16849 https://github.com/vim/vim/commit/0a336ccb57003c44ba303ccc50cf50cb640c2309 Co-authored-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/doc/builtin.txt7
-rw-r--r--runtime/lua/vim/_meta/vimfn.lua7
-rw-r--r--src/nvim/eval.lua7
3 files changed, 9 insertions, 12 deletions
diff --git a/runtime/doc/builtin.txt b/runtime/doc/builtin.txt
index 80ce36d948..1c6f1bf006 100644
--- a/runtime/doc/builtin.txt
+++ b/runtime/doc/builtin.txt
@@ -6796,10 +6796,9 @@ mkdir({name} [, {flags} [, {prot}]]) *mkdir()* *E73
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
the user, readable for others). Use 0o700 to make it
- unreadable for others.
-
- {prot} is applied for all parts of {name}. Thus if you create
- /tmp/foo/bar then /tmp/foo will be created with 0o700. Example: >vim
+ unreadable for others. This is used for the newly created
+ directories. Note an umask is applied to {prot} (on Unix).
+ Example: >vim
call mkdir($HOME .. "/tmp/foo/bar", "p", 0o700)
< This function is not available in the |sandbox|.
diff --git a/runtime/lua/vim/_meta/vimfn.lua b/runtime/lua/vim/_meta/vimfn.lua
index 5504d577d6..6c2b6af583 100644
--- a/runtime/lua/vim/_meta/vimfn.lua
+++ b/runtime/lua/vim/_meta/vimfn.lua
@@ -6173,10 +6173,9 @@ function vim.fn.min(expr) end
--- If {prot} is given it is used to set the protection bits of
--- the new directory. The default is 0o755 (rwxr-xr-x: r/w for
--- the user, readable for others). Use 0o700 to make it
---- unreadable for others.
----
---- {prot} is applied for all parts of {name}. Thus if you create
---- /tmp/foo/bar then /tmp/foo will be created with 0o700. Example: >vim
+--- unreadable for others. This is used for the newly created
+--- directories. Note an umask is applied to {prot} (on Unix).
+--- Example: >vim
--- call mkdir($HOME .. "/tmp/foo/bar", "p", 0o700)
---
--- <This function is not available in the |sandbox|.
diff --git a/src/nvim/eval.lua b/src/nvim/eval.lua
index 3c06fc4fe3..7630ff9d77 100644
--- a/src/nvim/eval.lua
+++ b/src/nvim/eval.lua
@@ -7550,10 +7550,9 @@ M.funcs = {
If {prot} is given it is used to set the protection bits of
the new directory. The default is 0o755 (rwxr-xr-x: r/w for
the user, readable for others). Use 0o700 to make it
- unreadable for others.
-
- {prot} is applied for all parts of {name}. Thus if you create
- /tmp/foo/bar then /tmp/foo will be created with 0o700. Example: >vim
+ unreadable for others. This is used for the newly created
+ directories. Note an umask is applied to {prot} (on Unix).
+ Example: >vim
call mkdir($HOME .. "/tmp/foo/bar", "p", 0o700)
<This function is not available in the |sandbox|.