lxqt / pcmanfm-qt

File manager and desktop icon manager (Qt port of PCManFM and libfm)
https://lxqt-project.org
GNU General Public License v2.0
416 stars 113 forks source link

Bookmark downcased file name on an mtp:// partition #1940

Closed dhlocker closed 2 months ago

dhlocker commented 2 months ago

Bookmarked a file mtp://MFR_NAME_MFRNAME_Android_PhoneSERIALNUMBER Bookmark title was exactly "mtp://MFRNAME_MFRNAME_Android_PhoneSERIALNUMBER" but the bookmarked location was "mtp://mfrname_mfrname_android_phoneserialnumber" I manually edited the location to correct the case of the bookmark, clicked OK and it was downcased again. Again, manually edited the location to correct the case of the bookmark, clicked OK and it was downcased again. Opening the bookmark failed because the filename case was wrong.

Expected Behavior

The case of the filenames in the bookmark should be the same as that entered in the edit box or in the location box.

Current Behavior

Entire filename was downcased

Possible Solution

Just leave the filename text as-is; don't modify it.

Steps to Reproduce (for bugs)
  1. Plug in a phone to a USB port on a supporting machine
  2. [Allow to OpSys to] mount the phone to mtp://
  3. Right-click on Devices display of mounted phone: Open in New Tab
  4. Bookmark the new tab
  5. Menu->Bookmarks->Edit Bookmarks
  6. Observe that just-bookmarked device has been downcased
  7. Edit entry in the bookmark to correct case
  8. Click OK
  9. Edit Bookmarks again and note that device is downcased again
  10. Close device tab, but leave device mounted
  11. Menu->Bookmarks->[click on properly-cased device name]
  12. Observe that downcased device name is not found, so opening bookmark fails.
Context
System Information
tsujan commented 2 months ago

Not reproducible. Nothing is down-cased, neither in practice nor by the code. The bookmark remains exactly as it is.

[Allow to OpSys to] mount the phone to mtp://

I don't know about "OpSys", but a phone is mounted by pcmanfm-qt (actually libfm-qt) when you have gvfs-mtp (or whatever its name is in your distro). Whether another kind of mounting has a conflict with GLib/GVFS is outside the code of pcmanfm-qt/libfm-qt.