fossil can't checkout to the drive root
(1) By DRON666 on 2022-02-27 18:07:36 [source]
This commands failed:
fossil.exe open -k --workdir T:\ test.fossil
cannot create directory T:\
fossil.exe open -k --workdir T: test.fossil
SQLITE_IOERR(3338): os_win.c:48365: (123) winAccess(c:\tst\T:\_FOSSIL_)
SQL: ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''
SQLITE_CANTOPEN(14): os_win.c:48136: (123) winOpen(c:\tst\T:\_FOSSIL_)
SQL: ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''
SQLITE_CANTOPEN(14): cannot open file at line 48137 of [40fa792d35]
SQL: ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''
SQLITE_CANTOPEN(14): statement aborts at 4: [ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''] unable to open database: c:/tst/T:/_FOSSIL_
SQL: ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''
Database error: unable to open database: c:/tst/T:/_FOSSIL_: {ATTACH DATABASE 'c:/tst/T:/_FOSSIL_' AS 'localdb' KEY ''}
fossil.exe open -k --workdir \\?\T: test.fossil
unable to make \\?\T: the working directory
But this commands work correctly:
fossil.exe open -k --workdir \\?\T:\ test.fossil
project-name: <unnamed>
repository: C:/tst/test.fossil
local-root: //?/T:/
...
cd /d T:\
fossil.exe open -k c:\tst\test.fossil
project-name: <unnamed>
repository: C:/tst/test.fossil
local-root: T:/
...
And after this simple patch, all commands work correctly:
--- src/utf8.c
+++ src/utf8.c
@@ -237,6 +237,11 @@
memcpy(wUnicode, L"\\\\?\\UNC", 7*sizeof(wchar_t));
wUnicode += 7;
}
+ if( wUnicode[2]=='\0' && wUnicode[1]==':'){
+ wUnicode[2] = '\\';
+ wUnicode[3] = '\0';
+ return zUnicode;
+ }
/*
** In the remainder of the path, translate invalid characters to
** characters in the Unicode private use area. This is what makes
(3) By DRON666 on 2022-02-27 19:48:35 in reply to 2 [link] [source]
But why? My five-lines patch solve the extra
bug too.
(4) By sean (jungleboogie) on 2022-02-27 20:23:56 in reply to 3 [link] [source]
Why do you want to have your repo opened to the root of a drive?
If you read Richard’s response from the thread Warren linked, I suppose you’re now the second person in nearly 14 years who would want to open a repo at the root of a drive. What are the concerns with using a directory inside the drive?
(5) By DRON666 on 2022-02-27 21:45:27 in reply to 4 [link] [source]
Why do you want to have your repo opened to the root of a drive?
I have already tried to provide evidence on this forum, but I was completely ignored. I don't think that this case will be somehow different.
What are the concerns with using a directory inside the drive?
What are the concerns with fixing a 14-years-old bug?
So if you guys don't like Windows, then I'll just use the patched fossil.exe
and not bother you.
(6) By Larry Brasfield (larrybr) on 2022-02-27 22:28:12 in reply to 5 [link] [source]
I have already tried to provide evidence on this forum, but I was completely ignored. I don't think that this case will be somehow different.
It's already different. You were asked a question. One whose answer, as far as I can see, would help those responsible for Fossil to understand the user scenario and utility.
What are the concerns with fixing a 14-years-old bug?
One concern is to make sure that new problems are not introduced. As an example, suppose that "\\?\T:" was rewritten to refer to the root directory of whatever device, network share, directory, or whatever else is presently mapped to the object name "T:". Some folks might think that is valid, but in fact it is inconsistent with a long-standing convention in Windows which is that the notion of "current directory" is maintained on a per-drive basis. The name "\\?\T:" may not always refer to the same directory as "\\?\T:\", depending upon whether the currently-in-focus shell had recently done something like "cd T:some_subdir".
So if you guys don't like Windows, then I'll just use the patched fossil.exe and not bother you.
Fossil works well on Windows, a fact which considerable effort has gone into making true.