In my vimrc, I have the set directory=$VIMHOME/tmp/swapfiles// statement to keep my development folders clear of swap files. I am running vim 7.4.712 on MacOSX. After vim crashes, my preferred choice is to use the Diff in your plugin to examine the differences. When I'm done, using either :RecoverPluginFinish or :RecoverPluginGet, I think all is well. That is, until I edit the file again, and I go through the same operation. I traced it down to the call delete(fnameescape(swapname)) statement in recover#RecoverFinish(). The delete() function is returning a -2.
At the time the error occurred, the value of swapname is /Users/prunninger/.vim/tmp/swapfiles//%Users%prunninger%junk%foo.txt.swp, which fnameescape changes to /Users/prunninger/.vim/tmp/swapfiles//\%Users\%prunninger\%junk\%foo.txt.swp.
As I stated in my StackOverflow question, I suspect bad escaping, pointing to a nonexistent file, rather than a permission issue.
In my vimrc, I have the
set directory=$VIMHOME/tmp/swapfiles//
statement to keep my development folders clear of swap files. I am running vim 7.4.712 on MacOSX. After vim crashes, my preferred choice is to use theDiff
in your plugin to examine the differences. When I'm done, using either:RecoverPluginFinish
or:RecoverPluginGet
, I think all is well. That is, until I edit the file again, and I go through the same operation. I traced it down to thecall delete(fnameescape(swapname))
statement inrecover#RecoverFinish()
. Thedelete()
function is returning a -2.At the time the error occurred, the value of swapname is
/Users/prunninger/.vim/tmp/swapfiles//%Users%prunninger%junk%foo.txt.swp
, whichfnameescape
changes to/Users/prunninger/.vim/tmp/swapfiles//\%Users\%prunninger\%junk\%foo.txt.swp
.As I stated in my StackOverflow question, I suspect bad escaping, pointing to a nonexistent file, rather than a permission issue.