EldoS | Feel safer!

Software components for data protection, secure storage and transfer

How to deal with files with the same name in the same directory

Posted: 07/24/2014 03:51:04
by huang xianming (Basic support level)
Joined: 05/04/2014
Posts: 1

When some files with the same name appear in the same folder, double click on any one of them, only to open the same file
Posted: 07/24/2014 08:17:29
by Volodymyr Zinin (Team)

CBFS preserves case of file names when the callbacks are called. For example when someone opens a file "QwErTy.txt" then the exact file name is passed to the OnOpenFile callback.
But actually Windows by default works with file names as case insensitive. I.e. the file names "QwErTy.txt" and "qwerty.TXT" point to the same file.

In Callback File System there is the CaseSensitiveFileNames property. And it usually matters only if you application wants to support POSIX applications or NFS shares. When this property is set CBFS checks whether the application during file opening specifies the case sensitive name and allows to open file only in the case of strict correspondence. But for other openings CBFS still treats file names as case insensitive.
I know only one way in Windows to open a file as case insensitive - by the use of nt-API, like ZwCreateFile and ZwOpenFile. There is a flag OBJ_CASE_INSENSITIVE there. Also in the registry it is required to set a special flag which tells Windows to handle this flag. Without this registry setting the OBJ_CASE_INSENSITIVE flag doesn't work. Here is an information about it: http://technet.microsoft.com/en-us/li...25747.aspx



Topic viewed 1391 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!