jamyy2000 / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

undo file file name too long on linux #346

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. open file of which the full path+filename is longer than the maximum 
filename-length allowed by linux; in my case this is I think >134, because of 
cryptfs module. Otherwise >255
2. alter something, hit save

What is the expected output? What do you see instead?
Expected, normal write, no problem
In stead:
E828: Cannot open undo file for writing: 
/home/john/.vim/undodir/%home%john%projects%some_project%some_joomla_directory%c
omponents%com_jreviews%jreviews%cms_compat%joomla%models%everywhere%everywhere_c
om_content.php

What version of the product are you using? On what operating system?
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:59)
Ubunbu linux with cryptfs

Please provide any additional information below.
in .vimrc:
set undofile
set undodir=/home/john/.vim/undodir/

I found out it is the filename length because I tried creating the file 
manually, investigating what went wrong, and linux said the name was too long. 
On searching documentation and forums I have come up with zero information 
about this behaviour.

My suggestion for a clean fix for this is using a hash of path in stead of full 
path. 

Original issue reported on code.google.com by verders...@gmail.com on 22 Mar 2015 at 10:24