NTFS allows case-sensitivity in filenames, But Windows API normalizes all read/writes. I wish XYplorer could handle this, where appropriate.
I inadvertently created something like this (on <xydata>) while running my linux os, but then in XYplorer on windows, could access only one of the items, effectively making contents of the other non-existent to XY (and the system).
Doing "research" on how this may be done. Meanwhile, how does XY read paths in tagdb case-sensitively? Maybe those apis can be used here?
It's fine if you put it way down on the todo list.
handle NTFS case-sensitivity
handle NTFS case-sensitivity
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: handle NTFS case-sensitivity
AFAIK there are one or two APIs that support a flag to honor NTFS case-sensitivity.
But, how can I create such a test situation on Windows (not having Linux). Does Zip/Unzip work (i.e. could you send me a package)?
But, how can I create such a test situation on Windows (not having Linux). Does Zip/Unzip work (i.e. could you send me a package)?
FAQ | XY News RSS | XY Twitter
Re: handle NTFS case-sensitivity
I've created a tar archive, but Windows or common utils like 7zip can't extract it properly. Utils in cygwin work though. I'll try sending a minimal isolated cygwin testing environment.admin wrote:how can I create such a test situation on Windows (not having Linux). Does Zip/Unzip work (i.e. could you send me a package)?
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: handle NTFS case-sensitivity
Don't get too involved. I think this is madness and it's very unlikely that I will support it.
FAQ | XY News RSS | XY Twitter
Re: handle NTFS case-sensitivity
Okay, i've made a bare minimal cygwin environment+wrappers. (portable by itself, but you have to do a registry tweak to work with case-sensitive paths.)admin wrote:... (i.e. could you send me a package)?
https://drive.google.com/file/d/0B4sPBJ ... sp=sharing
run caseTest.bat in an admin cmd prompt. It will prompt for applying the registry tweak. Restart and run the bat again. Now you should be in a bash prompt [*], opened to ~ (home) which is set to the \home folder.
The tar archive is in home, which you can extract with:
Code: Select all
tar -xf ~/caseTest.tar
Code: Select all
tree ~/caseTest
Code: Select all
cat ~/caseTest/test_ABC.txt
cat ~/caseTest/test_abc.txt
Code: Select all
touch CasedFile.txt CASEDFILE.txt
Either way, as a result I've constructed a pretty nifty toolset to handle case-sensitive files on Windows.admin wrote:Don't get too involved. I think this is madness and it's very unlikely that I will support it.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: handle NTFS case-sensitivity
Thanks (though I won't have the time to test it now).
In the meantime I tried to create files that only differ in case according to MS Windows API documentation (CreateFile with FILE_FLAG_POSIX_SEMANTICS) but for unknown reasons it failed. Eventually I had to give up. If even this does not work I see not the slightest chance to support this.
In the meantime I tried to create files that only differ in case according to MS Windows API documentation (CreateFile with FILE_FLAG_POSIX_SEMANTICS) but for unknown reasons it failed. Eventually I had to give up. If even this does not work I see not the slightest chance to support this.
FAQ | XY News RSS | XY Twitter
Re: handle NTFS case-sensitivity
Eh? I'd tried the same thing, and I can create case-differing files! Have you set this to 0?admin wrote:In the meantime I tried to create files that only differ in case according to MS Windows API documentation (CreateFile with FILE_FLAG_POSIX_SEMANTICS) but for unknown reasons it failed. Eventually I had to give up.
Code: Select all
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive
my code snippet, in freebasic, if it helps
Code: Select all
#include "windows.bi"
/' CreateFile( https://msdn.microsoft.com/en-us/library/windows/desktop/aa363858(v=vs.85).aspx [def.] '/
Dim As HANDLE hFile ' handle to created/opened file
Dim As String FileName = Command(1) ' ptr to target filename
hFile = CreateFile( _
FileName, _ ' name of the file
GENERIC_READ Or GENERIC_WRITE, _ ' open for reading
FILE_SHARE_READ, _ ' share readable access
NULL, _ ' default security
OPEN_ALWAYS, _ ' open file or create if doesnt exist
FILE_ATTRIBUTE_NORMAL Or FILE_FLAG_POSIX_SEMANTICS,_ ' allow case-sensitivity
NULL _ ' no attr. template
)
/' [print output]
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
Re: handle NTFS case-sensitivity
btw,
I should clarify, the wish is to properly manage case-sensitive items already on the filesystem, not create new ones.admin wrote:In the meantime I tried to create files that only differ in case
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: handle NTFS case-sensitivity
OK, I had overlooked the obcaseinsensitive flag part. Now I can create them.
But I don't see how to manage them. Only CreateFile and FindFirstFileEx support case-sensitive operations, that's not enough for file management.
But I don't see how to manage them. Only CreateFile and FindFirstFileEx support case-sensitive operations, that's not enough for file management.
FAQ | XY News RSS | XY Twitter
Re: handle NTFS case-sensitivity
I can make do with a quick switch to my Xubuntu OS, or cygwin's (cp|mv|rm|rmdir|mkdir|touch|ls) - perhaps with a xyscript caller. (Wonder how these tools work... maybe some very low-level api calls?)
Still I'll appreciate it if you put a note on your desk somewhere in a corner. I don't think there are many FMs on Windows that can claim this particular feature.
Still I'll appreciate it if you put a note on your desk somewhere in a corner. I don't think there are many FMs on Windows that can claim this particular feature.
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]
[ this user is asleep ]
-
- Site Admin
- Posts: 60567
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: handle NTFS case-sensitivity
This funny folder is my note:
- Attachments
-
- posix.png (6.85 KiB) Viewed 857 times
FAQ | XY News RSS | XY Twitter