So the database layer is now at a point where case insensitivity is implementable. That’s good. The mechanics of the rest isn’t rocket science, I think. But there are a couple of usage points I’m not sure of… So here’s some out loud thinking.
Switching a folder between case sensitive and case insensitive mode
We need to somehow support changing the “mode” of a folder. Currently they’re all case sensitive. The way I envision things in the case insensitive case is that the database keys are in fact case-squashed versions of the file name. This means that converting a folder requires rewriting the database with changed keys. This is quite intrusive and difficult to do while the folder is running. Options;
- Attempt to implement on the fly conversion. This will probably be a major undertaking and I might fuck it up.
- Allow changes, but require restart for it to take effect. When starting up we check whether the desired state of the folder matches the database, and if not we rewrite the database before starting the folder. This is simpler to do, although still not trivial.
- Disallow changes to case insensitivity after folder creation. You must remove the folder and re-add it with new options, which necessarily entails rescanning and stuff. Trivial to implement, but not especially user friendly.
Is option number three enough to get this off the ground? Or do we need to aim for at least number two initially?
Communication between devices with differing case settings (for the same folder)
This won’t work very well at all. Assuming we allow it, a setup with one side case sensitive and the other insensitive would result in pretty much all the bugs and strangeness that we have today. Options;
- Run like today, but with a warning. Nobody reads warnings.
- Stop the folder when the mismatch is detected. Avoids the issue, is more noticeable.
- Disconnect the other device when the mismatch is detected. As above, but even more annoying.
I think number two, here? There’s some implementation trickery around being able to stop a folder (and keep it stopped) based on connected device state but it’s probably solvable.
Allowing case sensitive mode on case insensitive systems
We can detect whether a given folder is on a case sensitive or insensitive FS by probing, so lets assume we know how it should be configured. Should it be allowed to run a folder in case sensitive mode on case insensitive filesystems?
If yes, doing so will run into all the bugs caused by this that we have today. That’s not awesome.
If no, what do we do about all the existing systems today that do exactly this? We can recommend changing, but doing so automatically would break lots of setups due to differing setup between devices above…
Defaulting to case sensitive on case sensitive systems
If we are on Linux/BSD/etc with a case sensitive FS, should we default to case sensitive or insensitive folders? Case sensitive makes more sense for Linux-to-Linux setups, case insensitive is the only thing that would work with Linux-to-Windows etc.
I’m leaning towards always defaulting to case insensitive regardless.
What to do about case conflicts on case sensitive systems in case insensitive mode
Yeah I don’t know. We need to detect when scanning that there are conflicts and somehow handle those. Blacklist all case versions of the file? Stop the folder?