Let's say there is a file \\server-42\tmp\dir\test.txt
. When my plugin tries to execute this command via system()
it triggers an error:
cd "\\server-42\tmp\dir" && git ls-files --error-unmatch --full-name test.txt
The error is E484: Can't open file C:\Users\foo\AppData\Local\Temp\blah.tmp
.
The directory is produced by shellescape(fnamemodify(filepath, ':h')
, where filepath
is the full path to file. The file is produced by shellescape(fnamemodify(filepath, ':t')
.
How can I get this to work?
Many thanks in advance!
cd \\server-42\temp\dir
) You would have to map the network drive to drive letter and work with that I believe – Christian Brabandt Feb 14 '18 at 10:57\\hostname\path
(for almost as long as I can remember...I'm dating myself)...they call it a 'network path', though. :P I haven't tried to use them in Vim, though. – B Layer Feb 14 '18 at 11:13pushd
andpopd
instead – Christian Brabandt Feb 14 '18 at 12:04pushd
seems to work – thanks! I'll be happy to accept if you add it as an answer. – Andy Stewart Feb 16 '18 at 11:44