EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Paths uppercased when not mounting at drive letter

Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages
#34124
Posted: 07/28/2015 09:32:10
by CopyAgent Team (Priority Standard support level)
Joined: 08/31/2014
Posts: 6

We recently switched to mounting at directories in the user's home directory instead of using a drive letter by changing how we called AddMountingPoint().

Code
CallbackFileSystem::AddMountingPoint("Z:\\");

...changed to...
Code
CallbackFileSystem::AddMountingPoint("C:\\Users\\username\\mountpoint", CBFS_SYMLINK_MOUNT_MANAGER, nullptr);


It works great, but there's one quirk: the paths we're given from CBFS have been transformed into all uppercase! Often it's only the directory path leading up to the leaf but not the leaf itself, but other times (like for GetFileInfo) it's the entire path.

We're case-insensitive where we can be, so this works out fine for the most part for English-speaking users, but we run into trouble when using non-English characters.

For example, I made a file called Möbelträgerfüße.txt. But when I try to open it, CBFS gives me a callback with the filename MÖBELTRÄGERFÜßE.TXT. In this example, we have trouble converting the letters with umlauts and the eszett. Long-term we'd like to be able to handle this, but short-term we have other priorities.

Is there a way to get the CBFS callbacks to not do this?

Thanks,
Aaron Kluck
#34129
Posted: 07/28/2015 10:31:15
by Eugene Mayevski (EldoS Corp.)

As Windows filesystems are generally case-insensitive, the situation is quite normal and your code is expected to deal with it. I don't see where CBFS could support you in this case - we can't roll back uppercase to some other case which your code expects as we don't know it (only your code knows correct case).

Let's focus on the troubles with case conversion instead. What exactly problems are you having with it?


Sincerely yours
Eugene Mayevski
#34131
Posted: 07/28/2015 12:49:20
by CopyAgent Team (Priority Standard support level)
Joined: 08/31/2014
Posts: 6

Perhaps there's some misunderstanding. I don't expect CBFS to do the conversion for me - what I'm hoping is for CBFS to not change the cases to begin with. If we use CBFS to mount to a drive letter, and I double click a file in Explorer called "foo.txt", the callbacks we get from you all say "foo.txt". But if ALL we do differently is mount at a non-drive letter location using CBFS_SYMLINK_MOUNT_MANAGER with AddMountingPoint(), then suddenly the same double-clicking operation would cause the callbacks to say "FOO.TXT".

Since that's the only difference, it stands to reason that CBFS is causing this conversion. Maybe not directly, but by some way you're interacting with the OS.

Doing the case conversion ourselves is problematic because we use SQLite, which only provides collations that are case-insensitive for basic ASCII characters. As I said, we plan to solve this long-term, but we're looking for a short-term fix.
#34132
Posted: 07/28/2015 13:21:33
by Eugene Mayevski (EldoS Corp.)

Quote
CopyAgent Team wrote:
I don't expect CBFS to do the conversion for me - what I'm hoping is for CBFS to not change the cases to begin with.


CBFS doesn't do this. Windows does.


Sincerely yours
Eugene Mayevski
#35602
Posted: 01/18/2016 14:58:07
by Jeremy Spiegel (Priority Standard support level)
Joined: 01/29/2014
Posts: 16

Something changed in this behavior between CBFS 5 and 6. In version 5, the file names in the callbacks would have the preserved case (i.e. 'foo.txt' if I create a file with name 'foo.txt'). But in CBFS version 6, the callback is always provided with an upper-cased file name (i.e. 'FOO.TXT'). This is preventing me from upgrading to CBFS 6 since this breaks my application.
#35603
Posted: 01/18/2016 15:05:51
by Eugene Mayevski (EldoS Corp.)

Let's start with the common question - do you have the same problem with Mapper sample or any other test case / project?


Sincerely yours
Eugene Mayevski
#35605
Posted: 01/18/2016 20:33:23
by Jeremy Spiegel (Priority Standard support level)
Joined: 01/29/2014
Posts: 16

Sorry, but I wasn't able to reproduce the issue in Mapper or VDisk, though I was able to normalize the file name case in my application so this isn't an issue for me anymore.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.

Reply

Statistics

Topic viewed 3945 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!