mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-26 22:16:16 +01:00
Only mark regular files as backup files
Apps don't generally create backup directories, etc. So, if the file ends with ~ but is not a regular file shouldn't be considered a backup file. (#573673)
This commit is contained in:
parent
85a795b9ba
commit
d0cf7b3878
@ -1500,7 +1500,8 @@ _g_local_file_info_get (const char *basename,
|
||||
if (basename != NULL && basename[0] == '.')
|
||||
g_file_info_set_is_hidden (info, TRUE);
|
||||
|
||||
if (basename != NULL && basename[strlen (basename) -1] == '~')
|
||||
if (basename != NULL && basename[strlen (basename) -1] == '~' &&
|
||||
S_ISREG (statbuf.st_mode))
|
||||
g_file_info_set_attribute_boolean (info, G_FILE_ATTRIBUTE_STANDARD_IS_BACKUP, TRUE);
|
||||
#else
|
||||
if (dos_attributes & FILE_ATTRIBUTE_HIDDEN)
|
||||
|
Loading…
Reference in New Issue
Block a user