Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch allow-backslash-on-unix Excluding Merge-Ins
This is equivalent to a diff from 0a24257420 to c3d74f4f63
2013-01-27
| ||
20:29 | merge trunk, combine with "allow-backslash-on-unix" branch check-in: 38159dae32 user: jan.nijtmans tags: ticket-d17d6e5b17 | |
2013-01-11
| ||
12:28 | merge trunk check-in: 6e9e6436a6 user: jan.nijtmans tags: allow-backslash-in-card-filename | |
2012-12-20
| ||
22:59 | Allow backslash in filenames on UNIX (experiment) Closed-Leaf check-in: c3d74f4f63 user: jan.nijtmans tags: allow-backslash-on-unix | |
2012-12-19
| ||
08:24 | Allow backslash in card filenames without causing a SYNTAX error in card parsing. check-in: 0a24257420 user: jan.nijtmans tags: allow-backslash-in-card-filename | |
2012-12-18
| ||
21:04 | Fix a couple typos in comments. check-in: 55a28e7f5a user: mistachkin tags: trunk | |
Changes to src/file.c.
521 521 } 522 522 } else if( ((c & 0xff) == 0xed) && ((z[i+1] & 0xe0) == 0xa0) ){ 523 523 /* Unicode character in the range U+D800 - U+DFFF are for 524 524 * surrogate pairs, they shouldn't occur in filenames. */ 525 525 return 0; 526 526 } 527 527 } 528 - }else if( c=='\\' ){ 529 - return 0; 530 528 } 531 529 } 532 530 if( c=='/' ){ 533 531 if( z[i+1]=='/' ) return 0; 534 532 if( z[i+1]=='.' ){ 535 533 if( z[i+2]=='/' || z[i+2]==0 ) return 0; 536 534 if( z[i+2]=='.' && (z[i+3]=='/' || z[i+3]==0) ) return 0; ................................................................................ 767 765 fossil_print(" file_isdir = %d\n", file_wd_isdir(zName)); 768 766 } 769 767 } 770 768 771 769 /* 772 770 ** Return TRUE if the given filename is canonical. 773 771 ** 774 -** Canonical names are full pathnames using "/" not "\" and which 775 -** contain no "/./" or "/../" terms. 772 +** Canonical names are full pathnames using "/" not "\" (on Windows) 773 +** and which contain no "/./" or "/../" terms. 776 774 */ 777 775 int file_is_canonical(const char *z){ 778 776 int i; 779 777 if( z[0]!='/' 780 778 #if defined(_WIN32) 781 779 && (z[0]==0 || z[1]!=':' || z[2]!='/') 782 780 #endif 783 781 ) return 0; 784 782 785 783 for(i=0; z[i]; i++){ 784 +#if defined(_WIN32) 786 785 if( z[i]=='\\' ) return 0; 786 +#endif 787 787 if( z[i]=='/' ){ 788 788 if( z[i+1]=='.' ){ 789 789 if( z[i+2]=='/' || z[i+2]==0 ) return 0; 790 790 if( z[i+2]=='.' && (z[i+3]=='/' || z[i+3]==0) ) return 0; 791 791 } 792 792 } 793 793 }