Properly check the tmp dir mode

This was using a boolean && instead of a bitwise mask. Reported
by covertity.
This commit is contained in:
Alexander Larsson
2017-09-13 12:11:51 +02:00
parent 0b1e45c47f
commit 4e97018bc6

View File

@@ -639,7 +639,7 @@ flatpak_ensure_system_user_cache_dir_location (GError **error)
/* Must be owned by us */
st_buf.st_uid == getuid () &&
/* and not writeable by others */
(st_buf.st_mode && 0022) != 0)
(st_buf.st_mode & 0022) != 0)
return g_file_new_for_path (path);
path = g_strdup ("/var/tmp/flatpak-cache-XXXXXX");