Mercurial > geeqie.yaz
comparison src/filedata.c @ 1212:97f30a17dc6b
fixed safe delete
author | nadvornik |
---|---|
date | Sun, 21 Dec 2008 21:36:58 +0000 |
parents | e2bbe90b0dcd |
children | 31dc2f240afb |
comparison
equal
deleted
inserted
replaced
1211:e2bbe90b0dcd | 1212:97f30a17dc6b |
---|---|
17 #include "filefilter.h" | 17 #include "filefilter.h" |
18 #include "cache.h" | 18 #include "cache.h" |
19 #include "thumb_standard.h" | 19 #include "thumb_standard.h" |
20 #include "ui_fileops.h" | 20 #include "ui_fileops.h" |
21 #include "metadata.h" | 21 #include "metadata.h" |
22 #include "trash.h" | |
22 | 23 |
23 | 24 |
24 static GHashTable *file_data_pool = NULL; | 25 static GHashTable *file_data_pool = NULL; |
25 static GHashTable *file_data_planned_change_hash = NULL; | 26 static GHashTable *file_data_planned_change_hash = NULL; |
26 | 27 |
1947 static gboolean file_data_perform_delete(FileData *fd) | 1948 static gboolean file_data_perform_delete(FileData *fd) |
1948 { | 1949 { |
1949 if (isdir(fd->path) && !islink(fd->path)) | 1950 if (isdir(fd->path) && !islink(fd->path)) |
1950 return rmdir_utf8(fd->path); | 1951 return rmdir_utf8(fd->path); |
1951 else | 1952 else |
1952 return unlink_file(fd->path); | 1953 if (options->file_ops.safe_delete_enable) |
1954 return file_util_safe_unlink(fd->path); | |
1955 else | |
1956 return unlink_file(fd->path); | |
1953 } | 1957 } |
1954 | 1958 |
1955 gboolean file_data_perform_ci(FileData *fd) | 1959 gboolean file_data_perform_ci(FileData *fd) |
1956 { | 1960 { |
1957 FileDataChangeType type = fd->change->type; | 1961 FileDataChangeType type = fd->change->type; |