Lightroom Classic: Bugs with folder names containing % . [ \

  • 1
  • Problem
  • Updated 3 months ago
  • (Edited)
Here's how to replicate an issue with folder names

  1. Rename a folder with a "%" in it's name.
  2. (This will change the folder's name in the OS)
  3. Quit Lr
  4. Restart Lr
  5. Lr will have forgotten about this % and won't be able to locate the folder
The only way to fix it is to manually change the folder's name in the OS and locate the folder in LR.
Photo of Antoine Hlmn

Antoine Hlmn

  • 911 Posts
  • 219 Reply Likes

Posted 3 months ago

  • 1
Photo of Bill

Bill

  • 258 Posts
  • 38 Reply Likes
% is an invalid character for a Windows folder or file name, don't know about MacOS. It is a wildcard used for searches. 
Photo of Antoine Hlmn

Antoine Hlmn

  • 911 Posts
  • 219 Reply Likes
What do yo mean by wildcard?

I can’t find the % symbol in the invalid characters for Windows. I’m on macOS and it not a forbidden character. Lightroom manages to rename the folder properly but fails to load the folder at startup.
(Edited)
Photo of Bill

Bill

  • 258 Posts
  • 38 Reply Likes
I'm out of date, this is now allowed for Windows. But some applications remember the old standards and automatically remove the wildcards or just don't work properly with them. Historically Windows and Unix (remember MacOS is a GUI shell on top of Unix) did not allow wild card characters (%, *, and so forth) for system components such as folder and file names. 
Photo of john beardsworth

john beardsworth

  • 1346 Posts
  • 370 Reply Likes
In Lua, the programming language used in LR's interface, % is also awkward - it's an "escape character".
(Edited)
Photo of John R. Ellis

John R. Ellis, Champion

  • 5129 Posts
  • 1453 Reply Likes
I tried renaming a folder in the Folders panel to "xc", for every non-letter-digit character c on the US English keyboard. I had Preferences > FIle Handling > Treat The Following Characters As Illegal set to "/ :".

Bugs occurred with the following folder names:

x% - as described by Antoine. After restart, the folder is marked missing.

x. - Gives the error "This is not a legal folder name", while "x.y" is accepted. Interestingly, if you rename the imported folder "x" in Finder to "x." and then in LR do Find Missing Folder, LR will happily use the name "x." in the Folders panel.

x[ - You can rename a folder to "x[" without problem. But if you rename "x[" to "xy", the folder on disk gets renamed, but the Folders panel still shows "x[". When you click on another folder and then back to "x[", it gets marked as missing.

x\ - Gives the error "This is not a legal folder name", even though "\" is not shown in Preferences as an illegal character, and Finder allows you to rename a folder "x\". I think "\" should be included along with "/ :" in the Preferences illegal set.

I think the bugs with % , [ do indicate sloppy programming with Lua patterns.


Photo of Robert Somrak

Robert Somrak, Champion

  • 724 Posts
  • 227 Reply Likes
The simple solution is just don't use these oddball characters in filenames and folder names.  
Photo of John R. Ellis

John R. Ellis, Champion

  • 5129 Posts
  • 1453 Reply Likes
Yup.
Photo of Antoine Hlmn

Antoine Hlmn

  • 911 Posts
  • 219 Reply Likes
I disagree. If characters are not forbidden, they should work. It should either work or throw an error.
I know how painful it is, when writing code, to think about every possible issue that could occur, and that's why bugs are submitted: to correct for yet "untested", unwanted situations. Basically, a user should be allowed to perform EVERY allowed action with the EXPECTED output.

Adobe has too often used that statement of "You're using it wrong" or "That's not how it's supposed to be used". This is an unacceptable behaviour. Imagine a car manufacturer refusing to implement safety belts because "You're not supposed to drive my car into a wall".
Photo of Robert Somrak

Robert Somrak, Champion

  • 724 Posts
  • 227 Reply Likes
Thats true Antoine but for me I have at least 52 lower and uppercase characters and 10 digits along with a few others like dash and underline for filenames and folder names which are MORE than plenty.  If you choose to use the oddball characters than you take the chance of things breaking, not just in Lightroom but other programs.
Photo of Antoine Hlmn

Antoine Hlmn

  • 911 Posts
  • 219 Reply Likes
I agree, all the characters could be enough to work with. But other characters are valid and meaningful too. From a users standpoint, what’s the difference between a letter and %, & or # ? None. Those all exist because they have a meaning and there is no fundamental reason to make a distinction between them. To a non coder, there’s no reason to forbid their usage. It’s like a writer whom the editor would say: nope, you can’t use the letter “e”, I don’t like it’s shape.

If, for any reason, this generates a bug, it must be prevented by the software, BEFORE generating a bug. In a broader way, no unforbidden action should ever generate a bug.