[latexila] Avoid warning when deleting nonexistent file
- From: SÃbastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [latexila] Avoid warning when deleting nonexistent file
- Date: Sat, 10 Mar 2012 21:21:42 +0000 (UTC)
commit 6b91ec50b12e7c2b5951008e859123dc40f69970
Author: SÃbastien Wilmet <swilmet src gnome org>
Date: Sat Mar 10 22:07:46 2012 +0100
Avoid warning when deleting nonexistent file
src/utils.vala | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/utils.vala b/src/utils.vala
index 59ba1ef..1adfdb6 100644
--- a/src/utils.vala
+++ b/src/utils.vala
@@ -154,6 +154,9 @@ namespace Utils
public void delete_file (File file)
{
+ if (! file.query_exists ())
+ return;
+
try
{
file.delete ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]