GNOME Bugzilla – Bug 771018
batch rename not acting right with extensions like tar.xz
Last modified: 2016-09-08 18:54:45 UTC
When the file extension have more than one period (Eg: .tar.bz, .tar.xz), batch rename fails to work the right way: How to reproduce: 1. Create some files touch test.tar.xz test.tar.bz 2. Select the files -> rename 4. Select "[Original file name][1, 2, 3]" (or something) 5. The file get renamed to test.tar1.xz and test.tar2.bz It should be test1.tar.xz and test2.tar.bz. (test.tar.gz and test.tar.bz2 works right)
A extension cannot have more than one period. The extension of those archives are .bz and .xz respectively. The .tar part is meaningless until uncompressed the first extension. We could special case those, but where are we going to stop? :/ I guess .tar.whatever is known enough in Linux to special case...
Created attachment 335068 [details] [review] eel-vfs-extensions: Update filename extensions If a file had the extensions .tar.bz or .tar.xz, the function eel_filename_get_extension_offset would identify only .bz or .xz as an extension. To fix this, .xz and .bz were added among the other special cases.
Review of attachment 335068 [details] [review]: oh so we were special casing some :) looks good, thanks Alex!! You are on a strike
Attachment 335068 [details] pushed as 0b6a058 - eel-vfs-extensions: Update filename extensions