Author Topic: Weird Case-sensitive Issue  (Read 501 times)

Offline jkm

  • Newcomer
  • *
  • Posts: 34
    • View Profile
Weird Case-sensitive Issue
« on: September 06, 2020, 08:59:59 PM »
When Photo Mechanic opens a file ending File.jpg on a case-sensitive server, and then that file is cropped and saved as a new file, the file is called File.JPG.

This created a huge hours-long headache for my company today after someone tagged files then uploaded, then saved crops and then re-uploaded. File.JPG files were sorted based on ASCII order (upper case sorts before lower case) and therefore considered as master copies by official version sorting algorithms, and the real master copies File.jpg were considered as the edits.

We got it sorted out. After a lot of trouble. And thankfully no data was lost permanently.

But don't you think that when File.jpg is opened on a case-sensitive server, that Photo Mechanic ought to be smart enough to save the new file as FileA.JPG or FileA.jpg, anything else it doesn't really matter as long as it's NOT File.JPG?

I realize that under the hood it's simply trying to save the file as-is and checking to see if the name as-is exists. And since it happens to use capitalized extensions, it never realizes that the file does exist because it's a case-sensitive server and the original file used lower case extensions.

Unfortunately, the server can't be made case insensitive due to millions of files stored with short encoded global photo IDs that are case sensitive.

And sadly, the original files can't be converted to upper case either.

So I'm hoping PM can be programmed to realize that a new version of File.jpg should not be called File.JPG even on a case-sensitive server.

Idea: a possible solution would be to try to save new versions of files with the original case of the file extension instead of always using a default case (in this case, upper case). This way the same "save the file as-is, or else add a letter to the name" method which is currently programmed into Photo Mechanic would keep working properly with no changes.

Update: I did check the preferences to see if the "always use current file name case" is an option, and it's not. The only options are to use upper case file extensions (which my company has all PM installs set to use) or to use lower case file extensions. If we changed it to use lower case file extensions, then the same problem which happened above would happen much more frequently. So we can't solve the problem simply by changing PM to use lower car file extensions, because that would then cause this issue 99% of the time instead of 1% of the time.




Note: Photo Mechanic Version 6.0, build 5029 (4fe0625)

Offline jkm

  • Newcomer
  • *
  • Posts: 34
    • View Profile
Re: Weird Case-sensitive Issue
« Reply #1 on: September 17, 2020, 06:35:12 PM »
Any comments? This bug is obvious a critical one for anyone working on case-sensitive computers instead of consumer systems.

Offline jwvaughn

  • Full Member
  • ***
  • Posts: 127
  • Retired programmer
    • View Profile
Re: Weird Case-sensitive Issue
« Reply #2 on: September 17, 2020, 10:35:17 PM »
Look under Edit/Preferences/Files and there is an option to select extension case.

Jerry

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21900
    • View Profile
    • Camera Bits, Inc.
Re: Weird Case-sensitive Issue
« Reply #3 on: September 18, 2020, 07:01:53 AM »
Any comments? This bug is obvious a critical one for anyone working on case-sensitive computers instead of consumer systems.

We'll have to think on it some more.  There are lots of people who use Photo Mechanic on case-sensitive filesystems and setting the case of extensions via the preferences has worked well for them.  I understand your situation, but we'll have to think on it some more.

-Kirk