[vim/vim] Fix directory netrw-mc error on unix-like systems (PR #17230)

10 views
Skip to first unread message

Devin Weaver

unread,
Apr 30, 2025, 9:44:57 AMApr 30
to vim/vim, Subscribed

When attempting to copy a marked directory to a target directory the g:netrw_localcopydircmdopt was ignored resulting on unix systems to attempt to use the cp command without the required -R argument.

This change captures the g:netrw_localcopydircmdopt value and appends it to the system() call when the marked file(s) is a directory.

Setup:

mkdir /tmp/netrw-test
mkdir /tmp/netrw-test/foo
mkdir /tmp/netrw-test/bar
mkdir /tmp/netrw-test/bar/baz
touch /tmp/netrw-test/bar/baz/test.txt

To recreate the issue:

  1. run VIMRUNTIME=./runtime/ ./src/vim /tmp/netrw-test
  2. place cursor on foo and type mt to set the target
  3. place cursor on bar and type <Enter>
  4. place cursor on baz and type mf to mark a directory
  5. type mc to copy the directory

asciicast


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/17230

Commit Summary

  • e904931 runtime(netrw): Fix directory netrw-mc error on unix-like systems

File Changes

(1 file)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230@github.com>

Devin Weaver

unread,
Apr 30, 2025, 9:52:06 AMApr 30
to vim/vim, Subscribed
sukima left a comment (vim/vim#17230)

A workaround is to add this to your vimrc:

let g:netrw_localcopydircmd=cp -R”
let g:netrw_localcopydircmdopt=“”


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/c2842061405@github.com>

Christian Brabandt

unread,
Apr 30, 2025, 10:07:30 AMApr 30
to vim/vim, Subscribed
chrisbra left a comment (vim/vim#17230)

this should go via @saccarosium https://github.com/saccarosium/netrw.vim


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/c2842107414@github.com>

Devin Weaver

unread,
Apr 30, 2025, 10:17:11 AMApr 30
to vim/vim, Subscribed

Closed #17230.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/issue_event/17473917599@github.com>

Devin Weaver

unread,
Apr 30, 2025, 10:17:11 AMApr 30
to vim/vim, Subscribed
sukima left a comment (vim/vim#17230)

Done: saccarosium/netrw.vim#91


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/c2842137776@github.com>

Devin Weaver

unread,
Dec 18, 2025, 9:39:30 PM (8 hours ago) Dec 18
to vim/vim, Subscribed

Reopened #17230.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/issue_event/21660234474@github.com>

Devin Weaver

unread,
Dec 18, 2025, 9:39:30 PM (8 hours ago) Dec 18
to vim/vim, Subscribed
sukima left a comment (vim/vim#17230)

Since the original repository is now archived and moved here. I'd like to reopen this bug as it is still in issue on latest master branch. Thank you.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/c3673240257@github.com>

Devin Weaver

unread,
Dec 18, 2025, 9:47:18 PM (8 hours ago) Dec 18
to vim/vim, Subscribed

Closed #17230.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/issue_event/21660348440@github.com>

Devin Weaver

unread,
Dec 18, 2025, 9:47:24 PM (8 hours ago) Dec 18
to vim/vim, Subscribed
sukima left a comment (vim/vim#17230)

I was wrong. never mind.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/17230/c3673256061@github.com>

Reply all
Reply to author
Forward
0 new messages