D8208: [WIP] Add Duplicate feature
Nathaniel Graham
noreply at phabricator.kde.org
Fri Jan 10 23:10:05 GMT 2020
ngraham added a comment.
@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?
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/20200110/47feb2d5/attachment.htm>
More information about the kfm-devel
mailing list