Bug 237114 - importer fails if renaming pattern contains folder separators
Summary: importer fails if renaming pattern contains folder separators
Status: RESOLVED FIXED
Alias: None
Product: gwenview
Classification: Applications
Component: importer (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Gwenview Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-10 16:48 UTC by thePanz
Modified: 2019-10-31 20:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 19.12.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description thePanz 2010-05-10 16:48:59 UTC
Version:            (using KDE 4.4.3)
OS:                Linux
Installed from:    Ubuntu Packages

I'm importing some images from external drive and setted the renaming patter to "{date}/{name.lower}.{ext.lower}".

I select 2 files from a folder (no spaces in folder names) and no error message is displayed, but nothing is copied over.

I run Gwenviev_importer from console and thsi is the output messages:


ema@xadoom:~$ gwenview_importer /media/HD_Documenti
<unknown program name>(8241)/ KSystemTimeZonesPrivate::instance: instance(): ... initialised
QApplication::qAppName: Please instantiate the QApplication object first
<unknown program name>(8241)/ KSystemTimeZonesPrivate::readConfig: readConfig(): local zone= "Europe/Rome"
<unknown program name>(8241)/ KSystemTimeZonesPrivate::readZoneTab: readZoneTab( "/usr/share/zoneinfo/zone.tab" )
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/ema/.config/ibus/bus
Bus::open: Can not get ibus-daemon's address. 
IBusInputContext::createInputContext: no connection to ibus-daemon 
gwenview_importer(8241)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/usr/share/mime/magic"
gwenview_importer(8241)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing  "/home/ema/.local/share/mime/magic"
Error: Directory OlympusEq with 19535 entries considered invalid; not read.
Error: OlympusCs pointer references previously read OlympusEq directory. Ignored.
Error: OlympusRd pointer references previously read OlympusEq directory. Ignored.
Error: OlympusIp pointer references previously read OlympusEq directory. Ignored.
Error: OlympusFi pointer references previously read OlympusEq directory. Ignored.
gwenview_importer(8241)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
gwenview_importer(8241) Gwenview::ImporterPrivate::renameImportedUrl: Rename failed for KUrl("file:///media/HD_Documenti/Immagini-Albums/__fun/E3104131.JPG") 
Error: Directory OlympusEq with 19535 entries considered invalid; not read.
Error: OlympusCs pointer references previously read OlympusEq directory. Ignored.
Error: OlympusRd pointer references previously read OlympusEq directory. Ignored.
Error: OlympusIp pointer references previously read OlympusEq directory. Ignored.
Error: OlympusFi pointer references previously read OlympusEq directory. Ignored.
gwenview_importer(8241) Gwenview::ImporterPrivate::renameImportedUrl: Rename failed for KUrl("file:///media/HD_Documenti/Immagini-Albums/__fun/E3104130.JPG")

I'm open to test beta versions and to provide further info.

Regards
Comment 1 Aurelien Gateau 2012-09-19 10:29:19 UTC
This is caused by the '/' you added in the renaming pattern. This is currently not supported (but it should be).
Comment 2 Andrew Crouthamel 2018-11-09 01:09:26 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Andrew Crouthamel 2018-11-20 04:00:11 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Nate Graham 2019-10-31 20:24:00 UTC
Git commit 0eacf80b9331a0156327c7df586af802276abd44 by Nate Graham, on behalf of Bart De Vries.
Committed on 31/10/2019 at 20:23.
Pushed by ngraham into branch 'master'.

Create additional subfolders if needed (e.g. when extra slashes in FileNameFormater).

Summary:
The importer will (recursively) create additional subfolders if the autoformatter pattern
contains slashes.
Add additional unit tests to importertest.
Related: bug 336039
FIXED-IN: 19.12.0

Test Plan:
Added additional unit tests to check the creation of subfolders when slashes are present
in the autoformatter pattern.

Reviewers: #gwenview, ngraham

Reviewed By: #gwenview, ngraham

Subscribers: ngraham

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D25016

M  +13   -1    importer/importer.cpp
M  +21   -0    tests/auto/importertest.cpp

https://commits.kde.org/gwenview/0eacf80b9331a0156327c7df586af802276abd44