SUMMARY If a file in an archive (RAR in my case) has a filename too long, Ark in batch mode fails silently and does not report any error, nor any exit code. The file name is less than 255 characters, but has Japanese Unicode characters which ends up being refused by the file system anyway. STEPS TO REPRODUCE 1. Create an archive with a very long filename 2. Ark -b myarchive.rare OBSERVED RESULT The file with a long name is not extracted, but all other files are. EXPECTED RESULT An error message in the output (stderr at least), and an exit code that is not 0. SOFTWARE/OS VERSIONS Linux: Arch Linux, not using KDE (only i3) Ark: 21.04.2 KDE Frameworks Version: 5.83.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION I still need to figure out how to create an archive with an illegal filename like this myself.
Could you attach such a file so we don't have to spend time re-creating it?
Created attachment 140389 [details] Rar archive holding files with very long filenames This archive fails to extract two files due to their file names being too long.
Running ark -b long_filenames_test.rar I actually get a warning dialog.
The files with long kanji names can't be extracted. From journalctl -ex : ark.kerfuffle: Failed to move file "/home/joder/Documents/.ark-.QoLCeH/自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か........
(In reply to Albert Astals Cid from comment #3) > Running > ark -b long_filenames_test.rar > > I actually get a warning dialog. Interesting. I did not get any dialog. However, I did get the following error in terminal: Couldn't start kuiserver from org.kde.kuiserver.service: QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name org.kde.kuiserver was not provided by any .service files") Nothing in system logs however. I'm running Arch Linux, with i3 window manager. Even then, I should not have to resort to dialog boxes in batch mode (unattended). The exit code is still 0, even though there were some errors (ie. one or more files failed to be extracted), and there is no error message in stdout. Does it not defeats the purpose of batch mode?
I forgot to mention that it is still possible to extract the offending files with the following: unrar -inul long_filenames_test.rar "自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死 か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か 自由か死か自由か死か自由か死か自由か死か自由か死か.txt.txt" > short_file_name.txt
(In reply to JKFRT from comment #5) > (In reply to Albert Astals Cid from comment #3) > > Running > > ark -b long_filenames_test.rar > > > > I actually get a warning dialog. > > Interesting. I did not get any dialog. However, I did get the following > error in terminal: > > Couldn't start kuiserver from org.kde.kuiserver.service: > QDBusError("org.freedesktop.DBus.Error.ServiceUnknown", "The name > org.kde.kuiserver was not provided by any .service files") Well, there you go, your installation is broken.
(In reply to JKFRT from comment #6) > I forgot to mention that it is still possible to extract the offending files > with the following: > > unrar -inul long_filenames_test.rar > "自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自 > 由か死か自由か死 > か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自由か死か自 > 由か死か自由か死か自由か死か自由か死か自由か死か自由か死か 自由か死か自由か死か自由か死か自由か死か自由か死か.txt.txt" > > short_file_name.txt Yes well, you're renaming the file that's not the same you're asking ark to do :)
> Well, there you go, your installation is broken. My installation is not broken. I'm simply missing a KDE component that is not even part of Ark's dependencies and is not related to the problem which is "batch mode" does not output an error to stdout and the exit code is wrong. > Yes well, you're renaming the file that's not the same you're asking ark to do :) I'm asking Ark to extract in batch mode, and return errors codes if there is any. Ark should at least try to extract the file with a sanitized filename if it makes a point in not returning any error notification.
(In reply to JKFRT from comment #9) > > Well, there you go, your installation is broken. > > My installation is not broken. I'm simply missing a KDE component that is > not even part of Ark's dependencies Well, if missing a component that makes the dialog show when failing is "not broken" for you, fair enough. Also if "this is a thing ark uses" does not qualify as "dependency", fair enough. > and is not related to the problem which > is "batch mode" does not output an error to stdout and the exit code is > wrong. Who told you the exit code would be not 0? Is it documented somewhere? Because it seems you're just thinking "this would be nice" and when not happening you say "oh this must be a bug". The only thing batch mode is documented to do is "don't show the ui and directly uncompress" > > > Yes well, you're renaming the file that's not the same you're asking ark to do :) > > I'm asking Ark to extract in batch mode, and return errors codes if there is > any. > Ark should at least try to extract the file with a sanitized filename if it > makes a point in not returning any error notification. Well, it is showing a notification, if it doesn't show for you, again that's a problem of your installation, nothing we can really fix.
Please install kuiserver :) Batch mode is mainly aimed at file managers, not terminals, so it makes sense to error out with a notification instead of a stdout line. But of course patches are welcome to improve the stdout logs too.