[rygel] core: Don't error out if file does not exist
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Don't error out if file does not exist
- Date: Thu, 14 Apr 2011 23:30:42 +0000 (UTC)
commit 2eaa36aed967c28fc575aa85fe2c2d50e46ecbf2
Author: Jens Georg <mail jensge org>
Date: Wed Apr 13 17:50:39 2011 +0300
core: Don't error out if file does not exist
It might be that it hadn't been uploaded yet; so depending on the
back-end there might be a stale object in the database
src/rygel/rygel-item-destroyer.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-item-destroyer.vala b/src/rygel/rygel-item-destroyer.vala
index 47686dd..8fcf911 100644
--- a/src/rygel/rygel-item-destroyer.vala
+++ b/src/rygel/rygel-item-destroyer.vala
@@ -85,7 +85,9 @@ internal class Rygel.ItemDestroyer: GLib.Object, Rygel.StateMachine {
var writables = yield media_object.get_writables (this.cancellable);
foreach (var file in writables) {
- file.delete (this.cancellable);
+ if (file.query_exists (this.cancellable)) {
+ file.delete (this.cancellable);
+ }
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]