[shotwell/shotwell-0.26] When Trash is not available, also remove RAW file
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [shotwell/shotwell-0.26] When Trash is not available, also remove RAW file
- Date: Thu, 9 Nov 2017 11:56:55 +0000 (UTC)
commit b576977462ed4f987f24f47a029a3aff25d7e3c6
Author: Jens Georg <mail jensge org>
Date: Sat Aug 26 15:37:12 2017 +0200
When Trash is not available, also remove RAW file
https://bugzilla.gnome.org/show_bug.cgi?id=719186
src/MediaDataRepresentation.vala | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/MediaDataRepresentation.vala b/src/MediaDataRepresentation.vala
index 484404c..e78894f 100644
--- a/src/MediaDataRepresentation.vala
+++ b/src/MediaDataRepresentation.vala
@@ -723,6 +723,17 @@ public abstract class MediaSourceCollection : DatabaseSourceCollection {
// Note: we may get an exception even though the delete succeeded.
debug("Exception deleting file %s: %s", file.get_path(), err.message);
}
+
+ var masterfile = source.get_master_file();
+ if (masterfile != null) {
+ try {
+ masterfile.delete(null);
+ } catch (Error err) {
+ if (!(err is IOError.NOT_FOUND)) {
+ debug("Exception deleting master file %s: %s", masterfile.get_path(), err.message);
+ }
+ }
+ }
bool deleted = !file.query_exists();
if (!deleted && null != not_deleted) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]