[prev in list] [next in list] [prev in thread] [next in thread]
List: darcs-devel
Subject: [darcs-devel] [patch1634] Resolve issue2537: Allow / as root directory
From: Gian Piero Carrubba <bugs () darcs ! net>
Date: 2018-01-18 19:01:18
Message-ID: 1516302078.18.0.190609430058.patch1634 () darcs ! net
[Download RAW message or body]
Gian Piero Carrubba <gpiero@rm-rf.it> added the comment:
It occurred to me that this patch possibly doesn't work or could even do
harmful things in Windows, depending on how file paths are represented.
More specifically:
1. if absolute paths are in the form '/<volume>/<path>' (unlikely, I
think), this patch does evil things(tm), like considering '/D/file' to
be part of '/C/' repo.
2. if absolute paths are in the form '<volume>:\<path>' and the root of
a repo created in the top dir of a volume is '<volume>:\', i.e.:
'C:\file' and 'C:\' respectively, this patch fixes the problem on POSIX
but the issue still stands on Windows.
3. if absolute paths are in the form '<volume>:\<path>' and the root of
a repo created in the top dir of a volume is '<volume>:', i.e.:
'C:\file' and 'C:'(note the lack of slash) respectively, this patch
fixes the problem on POSIX. The issue was not present on Windows nor
this patch introduces a regression.
My guess is the right answer is the number 2, but I would be grateful if
someone could create a repo on the top dir of a volume and let me know
the content of the 'Root:' line in the output of `darcs show repo`.
Thanks,
Gian Piero.
PS: 'direction' (forward or backward) of the slashes is irrelevant as,
if I've read correctly the code, all backward slashes are transformed to
forward ones before comparing the paths.
__________________________________
Darcs bug tracker <bugs@darcs.net>
<http://bugs.darcs.net/patch1634>
__________________________________
_______________________________________________
darcs-devel mailing list
darcs-devel@osuosl.org
https://lists.osuosl.org/mailman/listinfo/darcs-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic