Bug 509245

Summary: Tellico saves image in wrong directory
Product: [Applications] tellico Reporter: Robby Stephenson <robby>
Component: generalAssignee: Robby Stephenson <robby>
Status: RESOLVED FIXED    
Severity: normal CC: louise.ripley
Priority: NOR    
Version First Reported In: 4.1.3   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 4.1.4
Sentry Crash Report:

Description Robby Stephenson 2025-09-07 18:29:28 UTC
Breaking out from Bug 508902:

STEPS TO REPRODUCE
1. Create a new book collection
2. Save the collection. For example, to the location "~/tellico/books.tc"
3. Settings => Configure Tellico...:
   Reopen file at startup: enable
   Image Storage Options: Store images in directory relative to data file
4. Save settings. Close and reopen tellico.
5. Add a book with a cover:
   Add entry from "Internet Search..."
   Search "2-84565-200-3"
   Search type: ISBN
   Search source: Open Library
6. Click on the entry without adding it to the collection.
7. Add the entry to the collection, then remove it from the collection.
8. Save the book collection, then create a new collection without saving it to disk: File => New Collection => New Music Collection
9. Add an album with a cover:
   Add entry from "Internet Search..."
   Search "078636633619"
   Search type: UPC/EAN
   Search source: MusicBrainz
10. Click on the entry without adding it to the collection.

The cover is written in the location of the previous collection: "~/tellico/books_files/" when it shouldn't be.
Comment 1 Robby Stephenson 2025-09-12 00:17:50 UTC
Git commit 1404fa093c7608167a1e258a3a15dcf92f5139b9 by Robby Stephenson.
Committed on 11/09/2025 at 21:44.
Pushed by rstephenson into branch 'master'.

Reset local image directory when creating a new collection

Having an empty local image directory is a signal to ImageFactory to
return the temp image location.
FIXED-IN: 4.1.4

M  +1    -0    ChangeLog
M  +6    -0    src/document.cpp
M  +16   -2    src/images/imagedirectory.cpp
M  +1    -0    src/images/imagedirectory.h
M  +3    -2    src/images/imagefactory.cpp
M  +2    -2    src/mainwindow.cpp
M  +6    -0    src/tests/documenttest.cpp

https://invent.kde.org/office/tellico/-/commit/1404fa093c7608167a1e258a3a15dcf92f5139b9
Comment 2 Robby Stephenson 2025-09-13 19:02:36 UTC
Git commit 0175ab23c9206826fc4eeffe2ce187be20208939 by Robby Stephenson.
Committed on 12/09/2025 at 00:19.
Pushed by rstephenson into branch '4.1'.

Reset local image directory when creating a new collection

Having an empty local image directory is a signal to ImageFactory to
return the temp image location.
FIXED-IN: 4.1.4

M  +1    -0    ChangeLog
M  +6    -0    src/document.cpp
M  +16   -2    src/images/imagedirectory.cpp
M  +1    -0    src/images/imagedirectory.h
M  +3    -2    src/images/imagefactory.cpp
M  +2    -2    src/mainwindow.cpp
M  +7    -1    src/tests/documenttest.cpp

https://invent.kde.org/office/tellico/-/commit/0175ab23c9206826fc4eeffe2ce187be20208939