D8208: [WIP] Add Duplicate feature
Filipe Azevedo
noreply at phabricator.kde.org
Sat Jan 11 13:45:36 GMT 2020
fazevedo added a comment.
In D8208#591704 <https://phabricator.kde.org/D8208#591704>, @ngraham wrote:
> @fvogt "test.foo" becoming "test.foo copy" is intentional because .foo isn't a known valid extension, and it's valid for files to have dots in their names. In general the approach of using `QMimeDatabase` supports this, solves the problems of using `QFileInfo` that @pino pointed out, and also allows seamless support for filename extensions with two dots in them (e.g. `tar.gz`).
>
> If I go back to using `QFileInfo` to chop up the file into filename + extension, then there's the difficult choice of what kind of file to fail on: If I use `QFileInfo::suffix()`, it will fail for extensions with two dots like `.tar.gz`; if I use `QFileInfo::completeSuffix()`, that fails for files with dots in their names outside of the extension.
>
> Each approach has drawbacks. Which would you find acceptable?
Why trying to append 'copy' in the base name whith possible headaches while you could simply do something like 'Copy N#1 of /original file name/' ?
REPOSITORY
R318 Dolphin
REVISION DETAIL
https://phabricator.kde.org/D8208
To: ngraham, #dolphin, #kde_applications, elvisangelaccio, dfaure, broulik, davidedmundson, fvogt
Cc: fvogt, pino, mthw, kfm-devel, meven, markg, fazevedo, cfeck, #dolphin, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200111/ec2c66fe/attachment.htm>
More information about the kfm-devel
mailing list