mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 04:32:15 +01:00
Merge branch 'fix-detection-of-trash-folders' into 'main'
Fix for issue "gio trash doesnt recognize existing trash directory ..." Closes #2439 See merge request GNOME/glib!2185
This commit is contained in:
commit
8a4816f119
@ -2070,6 +2070,7 @@ g_local_file_trash (GFile *file,
|
|||||||
(global_stat.st_mode & S_ISVTX) != 0)
|
(global_stat.st_mode & S_ISVTX) != 0)
|
||||||
{
|
{
|
||||||
trashdir = g_build_filename (globaldir, uid_str, NULL);
|
trashdir = g_build_filename (globaldir, uid_str, NULL);
|
||||||
|
success = TRUE;
|
||||||
|
|
||||||
if (g_lstat (trashdir, &trash_stat) == 0)
|
if (g_lstat (trashdir, &trash_stat) == 0)
|
||||||
{
|
{
|
||||||
@ -2079,12 +2080,14 @@ g_local_file_trash (GFile *file,
|
|||||||
/* Not a directory or not owned by user, ignore */
|
/* Not a directory or not owned by user, ignore */
|
||||||
g_free (trashdir);
|
g_free (trashdir);
|
||||||
trashdir = NULL;
|
trashdir = NULL;
|
||||||
|
success = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (g_mkdir (trashdir, 0700) == -1)
|
else if (g_mkdir (trashdir, 0700) == -1)
|
||||||
{
|
{
|
||||||
g_free (trashdir);
|
g_free (trashdir);
|
||||||
trashdir = NULL;
|
trashdir = NULL;
|
||||||
|
success = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g_free (globaldir);
|
g_free (globaldir);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user