[gtranslator] Added check in is_read_only function in order to verify if the file exists
- From: Pablo Sanxiao Roca <psanxiao src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gtranslator] Added check in is_read_only function in order to verify if the file exists
- Date: Tue, 15 Sep 2009 22:00:30 +0000 (UTC)
commit 3b4e7c74e32315954a46bdc68adb06199c638afb
Author: Pablo Sanxiao <psanxiao gnome org>
Date: Tue Sep 15 23:59:49 2009 +0200
Added check in is_read_only function in order to verify if the file exists
src/po.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/po.c b/src/po.c
index 5d3e504..9c3a426 100644
--- a/src/po.c
+++ b/src/po.c
@@ -299,7 +299,12 @@ is_read_only (const gchar *filename)
GFileInfo *info;
GFile *location;
+
location = g_file_new_for_path (filename);
+
+ if (!g_file_query_exists (location, NULL))
+ return FALSE;
+
info = g_file_query_info (location,
G_FILE_ATTRIBUTE_ACCESS_CAN_WRITE,
G_FILE_QUERY_INFO_NONE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]