runtime(netrw): Use proper UNC notation for temp files

Commit: 
https://github.com/vim/vim/commit/040a47a470c47240149dbe6bcf88d0a98ed6a5ba
Author: Miguel Barro <[email protected]>
Date:   Tue Nov 18 20:06:06 2025 +0000

    runtime(netrw): Use proper UNC notation for temp files
    
    closes: https://github.com/vim/vim/issues/18764
    
    Signed-off-by: Guybrush <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/runtime/pack/dist/opt/netrw/autoload/netrw.vim 
b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
index 3b80a4a31..2e0b1a68a 100644
--- a/runtime/pack/dist/opt/netrw/autoload/netrw.vim
+++ b/runtime/pack/dist/opt/netrw/autoload/netrw.vim
@@ -14,6 +14,7 @@
 " 2025 Oct 27 by Vim Project align comment after #18611
 " 2025 Nov 01 by Vim Project fix NetrwChgPerm #18674
 " 2025 Nov 13 by Vim Project don't wipe unnamed buffers #18740
+" 2025 Nov 18 by Vim Project use UNC paths when using scp and Windows paths 
#18764
 " Copyright:  Copyright (C) 2016 Charles E. Campbell {{{1
 "             Permission is hereby granted to use and distribute this code,
 "             with or without modifications, provided that this copyright
@@ -1701,10 +1702,10 @@ function netrw#NetRead(mode,...)
             else
                 let useport= ""
             endif
-            " 'C' in 'C:\path  o ile' is handled as hostname on windows.
+            " Using UNC notation in windows to get a unix like path.
             " This is workaround to avoid mis-handle windows local-path:
             if g:netrw_scp_cmd =~ '^scp' && has("win32")
-                let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\( 
\):[/\]\(.*\)$', '/ / ', '')
+                let tmpfile_get = substitute(tr(tmpfile, '\', '/'), '^\( 
\):[/\]\(.*\)$', '//' .. $COMPUTERNAME .. '/ $/ ', '')
             else
                 let tmpfile_get = tmpfile
             endif

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vLS6R-009umT-BN%40256bit.org.

Raspunde prin e-mail lui