Menu

#8 KRename failes to handle certain characters

open
nobody
None
5
2013-01-12
2009-11-09
xaverxn
No

KRename 4.0.0-1, KDE 4.3.3, Arch Linux i686

A given filename to be edited in the advanced mode of KRename is not handled correctly if there are several dots or a [ or ] in it.
Several dots seem to work partly but if smaller parts of the filename are to be re-used (e.g. Pattern [$1-3][$7-16]) mostly it doesn't work correctly.
The brackets seem to be 'escaped' by the program incorrectly because the new filename often contains \] where the old one contained ].

Discussion

  • Arpad Biro

    Arpad Biro - 2009-11-14

    Can you give a specific example (with original filename) for the "Several dots" bug?

     
  • xaverxn

    xaverxn - 2009-11-15

    Sure.
    I create an empty text file named testfile.01.txt
    I load it in krename and go to the 'advanced mode' (i. e. pattern-based renaming, I have the german interface so forgive me if the terms are slightly different in english)
    As a pattern I define to keep the original filename until the character '1', so the first 11 characters, and add the string 'done' at the end (and keep the original file ending):
    [$1-11]done
    What krename gives me as 'renamed file name' is "testfiledone.01.txt" instead of "testfile.01done.txt".
    So I guess the engine counts incorrectly, stopping at the first dot it finds. It does not have something to do with keeping the original file ending, because if I un-check the 'keep original file ending' box and edit it manually, the same error occurs.
    If you want I'll upload a screenshot somewhere.

     
  • Arpad Biro

    Arpad Biro - 2009-11-16

    Could you try it with the "File extension starts at" option set to "Last Dot"?
    I think that's the option you need.
    The default is "First Dot", which means that "testfile" is the filename and
    the rest of the name is the extension.

    As for the bracket thing: Dominik has already fixed the escaping bug.

     
  • xaverxn

    xaverxn - 2009-11-23

    Hm... I guess you're right. Somehow didn't see this pulldown menu...
    Maybe it would do the interface good to somehow group it together with the checkbox (leave extension unchanged) and the actual extension textedit field. Or maybe, I'm the only one that blind ;-)