Bug 457604 - When file operation fails due to a filename too long (or presumably other reasons), kid3 confusingly asks user to change permissions of the file
Summary: When file operation fails due to a filename too long (or presumably other rea...
Status: RESOLVED FIXED
Alias: None
Product: kid3
Classification: Applications
Component: general (show other bugs)
Version: 3.9.x
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Urs Fleisch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-07 21:35 UTC by tsweet64
Modified: 2023-01-12 04:37 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tsweet64 2022-08-07 21:35:01 UTC
SUMMARY
***
When kid3 fails to rename a file, such as due to a filename that is too long, it assumes the operation failed due to lack of write permissions and asks the user if they want to change the permissions, even if the error was not caused by a lack of permissions. This is a confusing UX design.
***


STEPS TO REPRODUCE
1. Set an extremely long song artist/title exceeding the max filename length (presumably 255 bytes)
2. Click the filename from tag button with `%t. %a - %s` as the format
3. Click save

OBSERVED RESULT
Renaming the file fails due to the name being too long. kid3 assumes it is due to a permissions error and prompts with "Error while writing file. Do you want to change the permissions?". Clicking yes does not fix the issue.

EXPECTED RESULT
Kid3 should display an error message specific to the error encountered during the file operation, such as "file name too long"

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.4
KDE Frameworks Version:  5.96.0
Qt Version:  5.15.5
Comment 1 Urs Fleisch 2022-09-21 19:33:16 UTC
I have now fixed this so that the error description ("File name too long" in this case) is displayed too. Note that you will still get a dialog asking if you want to change permissions because the `QFileInfo::isWritable()` check, which is made after an error occurs, is still true. The error description for "File name too long" is not displayed on Windows, even using the native low level Win32 API instead of POSIX errno does not help there, it just reports an unknown error. You can find a fixed version git20220921 in https://sourceforge.net/projects/kid3/files/kid3/development/.
Comment 2 Urs Fleisch 2023-01-12 04:37:56 UTC
Fixed in version 3.9.3.