EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Case sensitive filenames not handled properly

Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.
#12247
Posted: 01/29/2010 04:39:04
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

We developed a file system using call back framework. I am facing a problem when there are 2 files with names as test123 and TEST123.There are 2 scenarios

Steps for scenario 1
1 create test123
2 echo "Mayur" >> TEST123

As our file system is case preserving, new file named TEST123 should get created and data should be written into it. But, TEST123 is not created and data is written to test123.
However I am able to create TEST123 using explorer

Steps for scenario 2
1 create b0
2 create B0
3 echo "Mayur" >> B0 (write callback CbFsFileInfo has B0 filename)
4 type b0 (read callback CbFsFileInfo has B0 filename)
"Mayur"
5 type B0 (read callback CbFsFileInfo has B0 filename)
"Mayur"

type b0 should show file to be without data. Our enumerate directory callback is case sensitive. What could be wrong here ?
#12248
Posted: 01/29/2010 04:57:30
by Volodymyr Zinin (EldoS Corp.)

This is because case sensitive filenames are not supported by CallbackFS (at least yet). Perhaps we will make it but there can be problems with it -
at least most programs on Windows (and a part of Windows itself) don't expect that file names can be case sensitive and work with it inconsistently.
Please tell me why is it necessary to you?
#12249
Posted: 01/29/2010 05:29:14
by Mezeo Support (Basic support level)
Joined: 12/29/2009
Posts: 40

For callback FILE_CASE_PRESERVED_NAMES was set and not FILE_CASE_SENSITIVE_SEARCH.I was confused between FILE_CASE_SENSITIVE_SEARCH and FILE_CASE_PRESERVED_NAMES. Sorry, for that.

Even FILE_CASE_PRESERVED_NAMES was not set and "b0" already exists, I was able to create "B0". Does driver care enough to fail creation of "B0" ? Do I need to take care of this in callback code ?
#12252
Posted: 01/29/2010 07:24:12
by Volodymyr Zinin (EldoS Corp.)

FILE_CASE_PRESERVED_NAMES means that the FS saves the file name as is (i.e. it doesn't modify letter case). But it doesn't mean that there can be several file names with the same name.
FILE_CASE_SENSITIVE_SEARCH is what you want - i.e. it means that the FS distinguishes file names that differ only by letter case.

Quote
Mayur Thigale wrote:
Even FILE_CASE_PRESERVED_NAMES was not set and "b0" already exists, I was able to create "B0". Does driver care enough to fail creation of "B0" ? Do I need to take care of this in callback code ?

I think it's because your OnGetFileInfo callback returns that the file "B0" doesn't exist, but it should confirm its presence because there is a file "bo".
#12255
Posted: 01/29/2010 09:33:55
by Kurt Griffiths (Standard support level)
Joined: 12/08/2008
Posts: 34

Your data is probably getting written to the correct file, but your OpenFile call is not differentiating between the two.

We had a similar problem. In *any* callback that takes a filename (e.g., OpenFile, GetFileInfo), you have to ensure you do a case-insensitive search on your internal file list, but give preference to the exact match.

So, if you get "B0" you need to search your file list. You will see "B0" and "b0" but you should setup your file context using "B0" since that is the exact match.

A case-preserving/case-insensitive scheme (which is what virtually all Windows programs assume) normally can't really be implemented by CBFS automatically, because it doesn't have access to your internal data structures.
Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.

Reply

Statistics

Topic viewed 1587 times

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




|

Back to top

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

Got it!