[Xfce4-commits] <thunar:master> Assume mode 0777 if a file info lacks a unix::mode attribute.
Jannis Pohlmann
jannis at xfce.org
Thu Sep 3 14:44:01 CEST 2009
Updating branch refs/heads/master
to 5432039399f2c5ba235d9ebefbd6c80e2559de83 (commit)
from 93817ae8bd6337648e3b2dd71f7f48a5e70320b6 (commit)
commit 5432039399f2c5ba235d9ebefbd6c80e2559de83
Author: Jannis Pohlmann <jannis at xfce.org>
Date: Thu Sep 3 14:41:58 2009 +0200
Assume mode 0777 if a file info lacks a unix::mode attribute.
This helps getting rid of a lot of unnecessary emblems (like for the
trash icon in the side pane).
thunar/thunar-file.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/thunar/thunar-file.c b/thunar/thunar-file.c
index f0ac95a..7824047 100644
--- a/thunar/thunar-file.c
+++ b/thunar/thunar-file.c
@@ -1861,7 +1861,10 @@ thunar_file_get_mode (const ThunarFile *file)
if (file->info == NULL)
return 0;
- return g_file_info_get_attribute_uint32 (file->info, G_FILE_ATTRIBUTE_UNIX_MODE);
+ if (g_file_info_has_attribute (file->info, G_FILE_ATTRIBUTE_UNIX_MODE))
+ return g_file_info_get_attribute_uint32 (file->info, G_FILE_ATTRIBUTE_UNIX_MODE);
+ else
+ return 0777;
}
More information about the Xfce4-commits
mailing list