[f-spot] Warn when original file can't be removed.
- From: Ruben Vermeersch <rubenv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [f-spot] Warn when original file can't be removed.
- Date: Tue, 13 Jul 2010 15:18:18 +0000 (UTC)
commit 8699e5abf5a6db5403cb117fb0ea72da95c1a50a
Author: Ruben Vermeersch <ruben savanne be>
Date: Tue Jul 13 17:17:57 2010 +0200
Warn when original file can't be removed.
src/Import/ImportController.cs | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/Import/ImportController.cs b/src/Import/ImportController.cs
index 9aa072a..b39dc98 100644
--- a/src/Import/ImportController.cs
+++ b/src/Import/ImportController.cs
@@ -272,8 +272,12 @@ namespace FSpot.Import
{
if (RemoveOriginals) {
foreach (var uri in original_files) {
- var file = GLib.FileFactory.NewForUri (uri);
- file.Delete (null);
+ try {
+ var file = GLib.FileFactory.NewForUri (uri);
+ file.Delete (null);
+ } catch (Exception) {
+ Log.WarningFormat ("Failed to remove original file: {0}", uri);
+ }
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]