[digikam] [Bug 376815] New: Restore from Trash works incorrectly

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

[digikam] [Bug 376815] New: Restore from Trash works incorrectly

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

            Bug ID: 376815
           Summary: Restore from Trash works incorrectly
           Product: digikam
           Version: 5.5.0
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Preview
          Assignee: [hidden email]
          Reporter: [hidden email]
  Target Milestone: ---

If I delete a pair of files e.g.

20170201_181823_414.JPG
20170201_181823_414.DNG

and the restore them from Trash
digiKam renames them to:

20170201_181823_414.DNG
20170201_181823_4141.DNG

which causes crashes after:

digikam.rawengine: LibRaw: failed to run open_file:  Unsupported file format or
not RAW file
digikam.rawengine: Failed to load embedded RAW preview
digikam.rawengine: Try to use reduced RAW picture extraction
digikam.rawengine: LibRaw: failed to run open_file:  Unsupported file format or
not RAW file
digikam.general: Cannot extract preview for
"/media/data/Pictures/2017/February/20170201/20170201_181823_414.DNG"
digikam.metaengine: Orientation => Exif.Image.Orientation =>  1
ASSERT: "!qFuzzyIsNull(c)" in file
/usr/include/x86_64-linux-gnu/qt5/QtCore/qsize.h, line 347
Aborted

Tested on both digikam 5.4.0 installed and 5.5.0 latest appimage

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

--- Comment #1 from wildcowboy <[hidden email]> ---
Sometimes it renames the files the other way around.

20170201_183418_460.JPG
20170201_183418_4601.JPG

instead of

20170201_183418_460.JPG
20170201_183418_460.DNG

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

Maik Qualmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |5.5.0
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED
      Latest Commit|                            |https://commits.kde.org/dig
                   |                            |ikam/f528f24b54894b271a4bee
                   |                            |44a850b1ac46c10cc9

--- Comment #2 from Maik Qualmann <[hidden email]> ---
Git commit f528f24b54894b271a4bee44a850b1ac46c10cc9 by Maik Qualmann.
Committed on 22/02/2017 at 22:10.
Pushed by mqualmann into branch 'master'.

add random string to the trash filename to prevent another thread use the
filename already
FIXED-IN: 5.5.0

M  +2    -1    NEWS
M  +10   -0    libs/dtrash/dtrash.cpp

https://commits.kde.org/digikam/f528f24b54894b271a4bee44a850b1ac46c10cc9

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

Maik Qualmann <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
             Status|RESOLVED                    |REOPENED
   Version Fixed In|5.5.0                       |
                 CC|                            |[hidden email]
     Ever confirmed|0                           |1
      Latest Commit|https://commits.kde.org/dig |
                   |ikam/f528f24b54894b271a4bee |
                   |44a850b1ac46c10cc9          |

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

Mario Frank <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|                            |5.5
                 CC|                            |[hidden email]
      Latest Commit|                            |https://commits.kde.org/dig
                   |                            |ikam/f528f24b54894b271a4bee
                   |                            |44a850b1ac46c10cc9
         Resolution|---                         |FIXED
             Status|REOPENED                    |RESOLVED

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

Mario Frank <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Version Fixed In|5.5                         |5.5.0

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

--- Comment #3 from Maik Qualmann <[hidden email]> ---
Git commit 38e1582672ddd32bef4f0dbc3750654fdd128b07 by Maik Qualmann.
Committed on 23/02/2017 at 18:50.
Pushed by mqualmann into branch 'master'.

use QUuid to generate random string for filename

M  +4    -8    libs/dtrash/dtrash.cpp

https://commits.kde.org/digikam/38e1582672ddd32bef4f0dbc3750654fdd128b07

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

Johannes Hirte <[hidden email]> changed:

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

--- Comment #4 from Johannes Hirte <[hidden email]> ---
This leads now to the following compile error:

/var/tmp/portage/media-gfx/digikam-9999/work/digikam-9999/libs/dtrash/dtrash.cpp:
In static member function ‘static QString
Digikam::DTrash::getAvialableJsonFilePathInTrash(const QString&, const
QString&, int)’:
/var/tmp/portage/media-gfx/digikam-9999/work/digikam-9999/libs/dtrash/dtrash.cpp:222:41:
error: ‘QChar::QChar(char)’ is private within this context
     randomString.replace(0, 1, QChar('-'));
                                         ^
In file included from /usr/include/qt5/QtCore/qstring.h:48:0,
                 from /usr/include/qt5/QtCore/qobject.h:47,
                 from /usr/include/qt5/QtCore/QObject:1,
                 from
/var/tmp/portage/media-gfx/digikam-9999/work/digikam-9999/libs/dtrash/dtrash.h:29,
                 from
/var/tmp/portage/media-gfx/digikam-9999/work/digikam-9999/libs/dtrash/dtrash.cpp:24:
/usr/include/qt5/QtCore/qchar.h:562:5: note: declared private here
     QChar(char c) Q_DECL_NOTHROW;
     ^~~~~
make[2]: *** [libs/dtrash/CMakeFiles/dtrash_src.dir/build.make:63:
libs/dtrash/CMakeFiles/dtrash_src.dir/dtrash.cpp.o] Error 1


possible fix

diff --git a/libs/dtrash/dtrash.cpp b/libs/dtrash/dtrash.cpp
index 7b65f3844d..4eed798c3e 100644
--- a/libs/dtrash/dtrash.cpp
+++ b/libs/dtrash/dtrash.cpp
@@ -219,7 +219,7 @@ QString DTrash::createJsonRecordForFile(const QString&
collectionPath, const QSt
 QString DTrash::getAvialableJsonFilePathInTrash(const QString& collectionPath,
const QString& baseName, int version)
 {
     QString randomString = QUuid::createUuid().toString();
-    randomString.replace(0, 1, QChar('-'));
+    randomString.replace(0, 1, QChar(0x2D));
     randomString.chop(1);

     QString pathToCreateJsonFile = collectionPath + QLatin1Char('/') +


QChar::fromLatin1() should work too

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

--- Comment #5 from Maik Qualmann <[hidden email]> ---
Git commit 2d6880ab9cc7d9d714a767ff4be090fbb8092e7d by Maik Qualmann.
Committed on 24/02/2017 at 17:34.
Pushed by mqualmann into branch 'master'.

fix compile QChar()->QLatin1Char()

M  +1    -1    libs/dtrash/dtrash.cpp

https://commits.kde.org/digikam/2d6880ab9cc7d9d714a767ff4be090fbb8092e7d

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

[hidden email] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Preview                     |Database-Trash
                 CC|                            |[hidden email]

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

[digikam] [Bug 376815] Restore from Trash works incorrectly

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

--- Comment #6 from Andrius <[hidden email]> ---
This fug is fixed

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