Better to make the change inside the filename so the extension is unchanged.

I thought about that version, but it would make the code more complicated for just a simple feature. You'd have to do some splitting and use more temporary strings than just use g_strdup_sprintf(). It's also unclear how you'd get the no-extension part of the filename that has multiple dots in it, and it could mean more code as well.

I also don't think all people would want that version since appending an extension to a copy or backup is a common convention. A lot of people do cp filename.ext{,.orig} or cp filename.ext{,.copy}. I also find it more descriptive, even when done recursively like filename.ext.clone.clone, and is also consistent with the manner on how other file formats are named like .tar.gz. Besides, a clone is meant to be renamed anyway, when it's needed to be used to something other than just a copy.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.