View Single Post
Old 04-06-2024, 10:05 PM   #20
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
I think that this logic must be changed depending on filesystem type:

Code:
if (existing_bookpaths.contains(proposed_bookpath, Qt::CaseInsensitive))
But that would require knowing both source and destination filesystem case sensitivities which I do not want to do.

So maybe just a simple file exists() test would be better than a case insensitive search of existing bookpaths.

On a case sensitive filesystem, file exists() should return false for just a case change (assuming another file did not already exist with that case variant).

On a case insensitive filesystem, file exists() should return true for just a case change (and other case variants can not co-exist).

Yes, that should work on all filesystems without having to know which we are on

I will play around more tomorrow to test that approach.

Last edited by KevinH; 04-06-2024 at 10:17 PM.
KevinH is online now   Reply With Quote