comparison plugin/lawrencium.vim @ 88:08e0ab5985d2

Correctly escape paths on Windows.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 01 Jun 2014 15:04:06 -0700
parents e688b658ce5b
children 7fcb71064e85
comparison
equal deleted inserted replaced
87:e688b658ce5b 88:08e0ab5985d2
369 function! s:HgRepo.GetLawrenciumPath(path, action, value, ...) abort 369 function! s:HgRepo.GetLawrenciumPath(path, action, value, ...) abort
370 let l:path = a:path 370 let l:path = a:path
371 if a:0 == 0 || !a:1 371 if a:0 == 0 || !a:1
372 let l:path = self.GetRelativePath(a:path) 372 let l:path = self.GetRelativePath(a:path)
373 endif 373 endif
374 let l:path = escape(l:path, ' \') 374 let l:path = fnameescape(l:path)
375 let l:result = 'lawrencium://' . s:stripslash(self.root_dir) . '//' . l:path 375 let l:result = 'lawrencium://' . s:stripslash(self.root_dir) . '//' . l:path
376 if a:action !=? '' 376 if a:action !=? ''
377 let l:result = l:result . '//' . a:action 377 let l:result = l:result . '//' . a:action
378 if a:value !=? '' 378 if a:value !=? ''
379 let l:result = l:result . '=' . a:value 379 let l:result = l:result . '=' . a:value