https://bugs.kde.org/show_bug.cgi?id=451203
--- Comment #5 from Frederick Yin <f...@fkfd.me> --- (In reply to Méven Car from comment #4) > (In reply to Frederick Yin from comment #3) > > So I was compressing some files today, and I noticed something I thought was > > a bug but is actually related to this thread. > > > > Versions: Ark 22.04.3, Dolphin 22.04.3, Plasma 5.25.3, KF 5.96.0, Qt 5.15.5 > > on Arch Linux, kernel 5.18.14 > > > > Steps to reproduce: > > 1. Create two files named "abcde.c" and "abcde.h" in dolphin > > 2. Select both, then right click > > 3. Hover on "Compress" > > Expected behavior: context menu provides sensible filenames like > > "abcde.tar.gz" > > Observed behavior: the filenames are "abcde..tar.gz" and "abcde..zip" (two > > dots) > > Prefer reporting another bug next time ;-) This is a completely different > issue. > Bugs report are not conversations, they aim to gather information to resolve > the bug, or discuss the resolution. Sorry for bringing this one off-topic. I went ahead to file another bug request later (#457269), *but* it turns out someone thought of this ahead of me and sparked a discussion involving the randomness of user behavior (invent MR !120, https://invent.kde.org/utilities/ark/-/merge_requests/120). > > > > I read the source code and it should be related to the algorithm to find > > common prefixes > > (https://invent.kde.org/utilities/ark/-/blob/master/kerfuffle/addtoarchive. > > cpp#L205). If the last common character is '.', it will precede another '.' > > and make the filename appear weird to anyone who hasn't seen the code. I > > think we should fix it as a special case. > > > > If it sounds good to you I'll begin writing a patch soon. > > You got it right, patch welcome. > I would special case, this line to avoid appending '.' when base already > ends with '.' : > https://invent.kde.org/utilities/ark/-/blob/master/kerfuffle/addtoarchive. > cpp#L254 I wrote a patch locally and got it working, but I would abstain from pushing just yet and observe how the MR goes. Thanks for your support! -- You are receiving this mail because: You are watching all bug changes.