[digikam] [Bug 377719] New: Cannot rename file with overwrite

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] New: Cannot rename file with overwrite

bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

            Bug ID: 377719
           Summary: Cannot rename file with overwrite
           Product: digikam
           Version: 5.5.0
          Platform: openSUSE RPMs
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: AdvancedRename
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

Created attachment 104608
  --> https://bugs.kde.org/attachment.cgi?id=104608&action=edit
Rename  window

Rename file with overwrite is impossible – name is highlighted in red, and OK
button is inactive.
See an attachment.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite

bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Maik Qualmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #1 from Maik Qualmann <[hidden email]> ---
An overwrite of existing files is not desired when renaming. The renaming runns
automatically without question dialogs. So we check if a file with the new name
already exists.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #2 from Marek Potocki <[hidden email]> ---
(In reply to Maik Qualmann from comment #1)
> An overwrite of existing files is not desired when renaming. The renaming
> runns automatically without question dialogs. So we check if a file with the
> new name already exists.

In digiKam 4 it was possible, after confirm with dialog box. Now for rename it
is necessary to delete first old file with all metadata, or use external
application.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #3 from Simon <[hidden email]> ---
Created attachment 104779
  --> https://bugs.kde.org/attachment.cgi?id=104779&action=edit
Add option to overwrite existing files in advance rename dialog

This adds a checkbox to the advanced rename dialog to allow replacing existing
files by moving them to trash before renaming.

For the rename progress dialog I needed signals from iojobthreads for deletion
as well. Previously there was a special case in place just for renaming. I
generalized it such that for any kind of jobs signals are provided and the type
of job is identified via the enum Operation that is now in its own namespace
IOOperation located in iojobsthread.h. This was necessary as this enum is
needed over several "levels" of classes.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
            Summary|Cannot rename file with     |Cannot rename file with
                   |overwrite                   |overwrite [patch]

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104779|0                           |1
        is obsolete|                            |

--- Comment #4 from Simon <[hidden email]> ---
Created attachment 104795
  --> https://bugs.kde.org/attachment.cgi?id=104795&action=edit
Add option to overwrite existing files in advance rename dialog (V2)

Update for current master.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #5 from Simon <[hidden email]> ---
@Gilles, Maik, Mario: Did you already have time to look at this?

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #6 from Maik Qualmann <[hidden email]> ---
I have compiler warnings here:


/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:
In member function ‘void Digikam::AdvancedRenameProcessDialog::slotCancel(int,
const QList<QUrl>&)’:
/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:166:50:
warning: unused parameter ‘operation’ [-Wunused-parameter]
 void AdvancedRenameProcessDialog::slotCancel(int operation, const QList<QUrl>&
srcFiles)

/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:166:80:
warning: unused parameter ‘srcFiles’ [-Wunused-parameter]
 void AdvancedRenameProcessDialog::slotCancel(int operation, const QList<QUrl>&
srcFiles)

/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:
In member function ‘void
Digikam::AdvancedRenameProcessDialog::slotRenameFailed(int, const
QList<QUrl>&)’:
/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:208:56:
warning: unused parameter ‘operation’ [-Wunused-parameter]
 void AdvancedRenameProcessDialog::slotRenameFailed(int operation, const
QList<QUrl>& srcFiles)

/home/maik/Devel/digikam-software-compilation/core/utilities/advancedrename/advancedrenameprocessdialog.cpp:208:86:
warning: unused parameter ‘srcFiles’ [-Wunused-parameter]
 void AdvancedRenameProcessDialog::slotRenameFailed(int operation, const
QList<QUrl>& srcFiles)

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #7 from Maik Qualmann <[hidden email]> ---
I have now strange error messages in the console:

digikam.database: No location could be retrieved for
"file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"

digikam.general: Video file
"file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"  does not exist.

digikam.general: Failed to extract video thumbnail for
"file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"

These messages I have without the patch is not. Same files renamed.
Another thing is the OK button is not activated properly when a conflict has
been detected and now the checkbox is activated to move images in the trash.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104795|0                           |1
        is obsolete|                            |

--- Comment #8 from Simon <[hidden email]> ---
Created attachment 105227
  --> https://bugs.kde.org/attachment.cgi?id=105227&action=edit
Add option to overwrite existing files in advance rename dialog (V3)

Is there an option to make compilation fail on warnings? I can only find a
switch to make it carry on, but it already does that.

Regarding the ok button, I cannot reproduce the problem, it activates and
disables correctly here.

I will look into these weird errors (location is at least related, but video
thumbnails on jpgs and raws???).

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #9 from Simon <[hidden email]> ---
(In reply to Maik Qualmann from comment #7)
> digikam.database: No location could be retrieved for
> "file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"

The offending part for this is:


    QString destFile = d->currentInfo.first.toString(QUrl::RemoveFilename) +
d->currentInfo.second;
    // refresh thumbnail
    ThumbnailLoadThread::deleteThumbnail(destFile);
    // clean LoadingCache as well
    LoadingCacheInterface::fileChanged(destFile);

This was previously executed before the tests in a separate function, however
it should be at the exact same position regarding real actions. Commenting
these lines out makes the error disappear and has not perceivable downside. Any
idea what these commands are for?

> digikam.general: Video file
> "file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"  does not exist.
>
> digikam.general: Failed to extract video thumbnail for
> "file:///daten/Bilder/Zugang/2017-03-08/Screenshot-004.jpg"

I have no idea yet what this Video business is about.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #105227|0                           |1
        is obsolete|                            |

--- Comment #10 from Simon <[hidden email]> ---
Created attachment 105276
  --> https://bugs.kde.org/attachment.cgi?id=105276&action=edit
Add option to overwrite existing files in advance rename dialog (V4)

Removing these two lines makes all problems (that I have) disappear. These
lines were introduced in 2010 and last touched (i.e. moved around) in 2012. I
don't see any reason to regenerate the thumbnail on move: The image doesn't
change and e.g. copy operations don't do it either. So these lines are out of
the current patch.

Maik, do you still have the problem with the ok button? And if so, can you
describe how to reproduce it, because I can't - thanks in advance.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #11 from Maik Qualmann <[hidden email]> ---
A quick test:
- compiling is OK
- Messages in the console is OK
- OK Button enabled state not.

Make sure the "move to trash" checkbox ist disabled. Open renaming and have a
conflict (red entries and button is disabled). Activate the checkbox now,
entries not red, but the button is disabled.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #12 from Simon <[hidden email]> ---
Thanks for testing.
Can you provide more details or screenshots, I really can't observe the same:
http://i.imgur.com/oLK907n.png
http://i.imgur.com/QTc2muy.png

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #13 from Maik Qualmann <[hidden email]> ---
Ok, the cause is clear. Try to rename the same file with the same name. This
case is not solvable, the file would be moved into the trash and can not be
renamed. This case should still create a red entry or renaming should skip this
file.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #14 from Simon <[hidden email]> ---
Created attachment 105286
  --> https://bugs.kde.org/attachment.cgi?id=105286&action=edit
Add option to overwrite existing files in advance rename dialog (V5)

Ah right, I think that case wasn't handled before either, so I missed it.
Now I introduced a new "state": Unchanged. It is signified by the filenames
being in gray. These are ignored, meaning the ok button is activated, unless
all files are unchanged.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #15 from Maik Qualmann <[hidden email]> ---
Simon,

I have now always red entries when I try to rename several files.

Maik

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #105276|0                           |1
        is obsolete|                            |
 Attachment #105286|0                           |1
        is obsolete|                            |

--- Comment #16 from Simon <[hidden email]> ---
Created attachment 105304
  --> https://bugs.kde.org/attachment.cgi?id=105304&action=edit
Add option to overwrite existing files in advance rename dialog (V6)

Shuffling code around usually causes side-effects, sorry for not testing.
Now I did a fair bit of renaming and did find a small issue with auto-detected
sidecar files, which is also fixed in V6.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

Simon <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #105304|0                           |1
        is obsolete|                            |

--- Comment #17 from Simon <[hidden email]> ---
Created attachment 105497
  --> https://bugs.kde.org/attachment.cgi?id=105497&action=edit
Add option to overwrite existing files in advance rename dialog (V7)

Update to master.

--
You are receiving this mail because:
You are the assignee for the bug.
Reply | Threaded
Open this post in threaded view
|

[digikam] [Bug 377719] Cannot rename file with overwrite [patch]

bugzilla_noreply
In reply to this post by bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=377719

--- Comment #18 from [hidden email] ---
Simon, Maik, Mario,

The next 5.6.0 is planed this Sunday. I propose to delay by 2 weeks this
release to permit to generate a test AppImage including this patch (and also
other recent commits from Simon), at least to see if nothing is broken through
users feedback.

Gilles

--
You are receiving this mail because:
You are the assignee for the bug.
12