Mercurial > vim
comparison src/buffer.c @ 1420:b63fe7400eb3 v7.1.135
updated for version 7.1-135
author | vimboss |
---|---|
date | Wed, 03 Oct 2007 12:31:33 +0000 |
parents | 0e6b369b9760 |
children | bdbaeab157e6 |
comparison
equal
deleted
inserted
replaced
1419:7e5284f58094 | 1420:b63fe7400eb3 |
---|---|
4173 /* | 4173 /* |
4174 * Force expanding the path always for Unix, because symbolic links may | 4174 * Force expanding the path always for Unix, because symbolic links may |
4175 * mess up the full path name, even though it starts with a '/'. | 4175 * mess up the full path name, even though it starts with a '/'. |
4176 * Also expand when there is ".." in the file name, try to remove it, | 4176 * Also expand when there is ".." in the file name, try to remove it, |
4177 * because "c:/src/../README" is equal to "c:/README". | 4177 * because "c:/src/../README" is equal to "c:/README". |
4178 * Similarly "c:/src//file" is equal to "c:/src/file". | |
4178 * For MS-Windows also expand names like "longna~1" to "longname". | 4179 * For MS-Windows also expand names like "longna~1" to "longname". |
4179 */ | 4180 */ |
4180 #ifdef UNIX | 4181 #ifdef UNIX |
4181 return FullName_save(fname, TRUE); | 4182 return FullName_save(fname, TRUE); |
4182 #else | 4183 #else |
4183 if (!vim_isAbsName(fname) || strstr((char *)fname, "..") != NULL | 4184 if (!vim_isAbsName(fname) |
4184 #if defined(MSWIN) || defined(DJGPP) | 4185 || strstr((char *)fname, "..") != NULL |
4186 || strstr((char *)fname, "//") != NULL | |
4187 # ifdef BACKSLASH_IN_FILENAME | |
4188 || strstr((char *)fname, "\\\\") != NULL | |
4189 # endif | |
4190 # if defined(MSWIN) || defined(DJGPP) | |
4185 || vim_strchr(fname, '~') != NULL | 4191 || vim_strchr(fname, '~') != NULL |
4186 #endif | 4192 # endif |
4187 ) | 4193 ) |
4188 return FullName_save(fname, FALSE); | 4194 return FullName_save(fname, FALSE); |
4189 | 4195 |
4190 fname = vim_strsave(fname); | 4196 fname = vim_strsave(fname); |
4191 | 4197 |
4192 #ifdef USE_FNAME_CASE | 4198 # ifdef USE_FNAME_CASE |
4193 # ifdef USE_LONG_FNAME | 4199 # ifdef USE_LONG_FNAME |
4194 if (USE_LONG_FNAME) | 4200 if (USE_LONG_FNAME) |
4195 # endif | 4201 # endif |
4196 { | 4202 { |
4197 if (fname != NULL) | 4203 if (fname != NULL) |
4198 fname_case(fname, 0); /* set correct case for file name */ | 4204 fname_case(fname, 0); /* set correct case for file name */ |
4199 } | 4205 } |
4200 #endif | 4206 # endif |
4201 | 4207 |
4202 return fname; | 4208 return fname; |
4203 #endif | 4209 #endif |
4204 } | 4210 } |
4205 | 4211 |