|
2009-09-13
| ||
| 16:21 | • Fixed ticket [cdd360438d]: Fossil does not handle absolute paths without disk drives in Windows. plus 2 other changes artifact: 1314ea49b2 user: drh | |
| 16:19 | On windows, if the first character of a pathname is '\' then assume that is a full pathname, not a relative pathname. Ticket [cdd360438de]. check-in: 42bf80978d user: drh tags: trunk | |
| 11:47 | • Ticket [cdd360438d] Fossil does not handle absolute paths without disk drives in Windows. status still Open with 2 other changes artifact: 782f8afcae user: drh | |
| 06:14 | • New ticket [cdd360438d]. artifact: 4ab065e6c3 user: anonymous | |
| Ticket Hash: | cdd360438de1331b83874fbb70f4e0d22fdbae79 | ||
| Title: | Fossil does not handle absolute paths without disk drives in Windows. | ||
| Status: | Fixed | Type: | Code_Defect |
| Severity: | Minor | Priority: | |
| Subsystem: | Resolution: | Fixed | |
| Last Modified: |
2009-09-13 16:21:13 16.55 years ago |
Created: |
2009-09-13 06:14:21 16.55 years ago |
| Version Found In: | 713b8be852 | ||
| Description: | ||||
Attempt #1 to open a repository in Windows:
e:\source\c\fossil>fossil open \Source\Repositories\fossil.fsl fossil: repository does not exist or is in an unreadable directory: E:/Source/C/fossil/Source/Repositories/fossil.fslAttempt #2: e:\source\c\fossil>fossil open E:\Source\Repositories\fossil.fsl BUILD.txt COPYRIGHT-GPL2.txt Makefile Makefile.w32 art/CollRev1.dia art/CollRev2.dia art/CollRev3.dia art/CollRev4.dia art/branching.odp . . .It bizarrely assumes that a path with an opening backslash is relative to the current path instead of relative to the drive root like it should. It seems fossil only recognizes a full path specification if it includes device names. This is a Bad Idea. It makes me wonder how it handles UNC or UNCW paths as well: \\Computer\SharedFolder\Path\To\Destination\File \\?\UNC\Computer\SharedFolder\Path\To\Destination\File.(I have no way of testing that at the moment as the Windows machine I'm using is not on a network with any other Windows machines.) drh added on 2009-09-13 11:47:15:
--- src/file.c
+++ src/file.c
@@ -244,10 +244,11 @@
** Convert /A/../ to just /
*/
void file_canonical_name(const char *zOrigName, Blob *pOut){
if( zOrigName[0]=='/'
#ifdef __MINGW32__
+ || zOrigName[0]=='\\'
|| (strlen(zOrigName)>3 && zOrigName[1]==':'
&& (zOrigName[2]=='\\' || zOrigName[2]=='/'))
#endif
){
blob_set(pOut, zOrigName);
I will strive to boot up a copy of windows this afternoon and try it out. In the meantime, a work-around might be to use forward slashes ("/") instead of backslashes ("\") in the pathname, at least for the first character of an absolute pathname. drh added on 2009-09-13 16:21:13: | ||||