Skip to content

Commit b58bea5

Browse files
committed
nemo-file.c: add EFAULT as a valid exception to the access_ok
function. This can throw when the file has just been moved or is in the midst of being moved and the internal async updates have not completed yet (usually during a fairly large transfer.) As a result, the icon cache problem bar appears needlessly. The original purpose for the thumbnail cache detection is that programs that are run with elevated privileges (such as editors) will generate their own thumbnails with elevated priviliges, in the common folder designated for such by both gnome-desktop and cinnamon-desktop, which both provide the thumbnailing API that many programs use. Unfortunately, when nemo attempts to update the thumbnail for a particular file, and cinnamon-desktop reports that it cannot, because of invalid permissions on an existing cached thumbnail, there is really nothing that can be done except either a) regenerate the entire cache or b) repair the broken files. nemo --fix-cache repairs any broken files, clearing the issue, and allowing thumbnailing to proceed on the file. Fixes: #1429 Fixes: #1248 Fixes: https://bugs.launchpad.net/linuxmint/+bug/1592293
1 parent 7d56e84 commit b58bea5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

libnemo-private/nemo-file.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2140,8 +2140,9 @@ static gboolean
21402140
access_ok (const gchar *path)
21412141
{
21422142
if (g_access (path, R_OK|W_OK) != 0) {
2143-
if (errno != ENOENT)
2143+
if (errno != ENOENT && errno != EFAULT) {
21442144
return FALSE;
2145+
}
21452146
}
21462147

21472148
return TRUE;

0 commit comments

Comments
 (0)