diff --git a/gio/glocalfileinfo.c b/gio/glocalfileinfo.c index 94de17057..33c224186 100644 --- a/gio/glocalfileinfo.c +++ b/gio/glocalfileinfo.c @@ -929,7 +929,7 @@ get_access_rights (GFileAttributeMatcher *attribute_matcher, uid_t uid = geteuid (); if (uid == _g_stat_uid (statbuf) || - uid == parent_info->owner || + uid == (uid_t) parent_info->owner || uid == 0) writable = TRUE; } diff --git a/gio/glocalfileinfo.h b/gio/glocalfileinfo.h index ff3e4994f..e04e921f2 100644 --- a/gio/glocalfileinfo.h +++ b/gio/glocalfileinfo.h @@ -46,6 +46,7 @@ typedef struct gboolean writable; gboolean is_sticky; gboolean has_trash_dir; + /* owner should be uid_t but it breaks compliance with MS-Windows */ int owner; dev_t device; ino_t inode;