comparison src/fileio.c @ 17503:ba848dceb1c9

(Fexpand_file_name): Fix expansion of "/foo/../".
author Richard M. Stallman <rms@gnu.org>
date Fri, 18 Apr 1997 02:47:40 +0000
parents 7fbce3c83857
children 648beff801bb
comparison
equal deleted inserted replaced
17502:8f3dcea869f5 17503:ba848dceb1c9
1377 && o != target 1377 && o != target
1378 && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0)) 1378 && (IS_DIRECTORY_SEP (p[3]) || p[3] == 0))
1379 { 1379 {
1380 while (o != target && (--o) && !IS_DIRECTORY_SEP (*o)) 1380 while (o != target && (--o) && !IS_DIRECTORY_SEP (*o))
1381 ; 1381 ;
1382 if (o == target && IS_ANY_SEP (*o)) 1382 /* Keep initial / only if this is the whole name. */
1383 if (o == target && IS_ANY_SEP (*o) && p[3] == 0)
1383 ++o; 1384 ++o;
1384 p += 3; 1385 p += 3;
1385 } 1386 }
1386 else 1387 else
1387 { 1388 {