[niepce/gtk4] library: when writing an XMP, add it to the bundles



commit 67f46b69e7dfea466a02b71c968312a0d1517cb7
Author: Hubert Figuière <hub figuiere net>
Date:   Fri May 13 22:00:52 2022 -0400

    library: when writing an XMP, add it to the bundles

 crates/npc-engine/src/db/library.rs | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/crates/npc-engine/src/db/library.rs b/crates/npc-engine/src/db/library.rs
index 545b2ba..4d96e5e 100644
--- a/crates/npc-engine/src/db/library.rs
+++ b/crates/npc-engine/src/db/library.rs
@@ -1116,7 +1116,13 @@ impl Library {
                                 dbg_assert!(xmp_file_id > 0, "couldn't add xmp_file");
                                 // XXX handle error
                                 let res = self.add_xmp_sidecar_to_bundle(id, xmp_file_id);
-                                dbg_assert!(res.is_ok(), "addSidecarFileToBundle failed");
+                                dbg_assert!(res.is_ok(), "add_xmp_sidecar_to_bundle failed");
+                                let res = self.add_sidecar_fsfile_to_bundle(
+                                    id, xmp_file_id,
+                                    Sidecar::Xmp(PathBuf::new()).to_int(),
+                                    "xmp",
+                                );
+                                dbg_assert!(res.is_ok(), "add_sidecar_fsfile_to_bundle failed");
                             }
                         }
                     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]