fixed safe delete
authorVladimir Nadvornik <nadvornik@suse.cz>
Sun, 21 Dec 2008 21:36:58 +0000 (21:36 +0000)
committerVladimir Nadvornik <nadvornik@suse.cz>
Sun, 21 Dec 2008 21:36:58 +0000 (21:36 +0000)
src/filedata.c

index 4aca86d..fb461dc 100644 (file)
@@ -19,6 +19,7 @@
 #include "thumb_standard.h"
 #include "ui_fileops.h"
 #include "metadata.h"
+#include "trash.h"
 
 
 static GHashTable *file_data_pool = NULL;
@@ -1949,7 +1950,10 @@ static gboolean file_data_perform_delete(FileData *fd)
        if (isdir(fd->path) && !islink(fd->path))
                return rmdir_utf8(fd->path);
        else
-               return unlink_file(fd->path);
+               if (options->file_ops.safe_delete_enable)
+                       return file_util_safe_unlink(fd->path);
+               else
+                       return unlink_file(fd->path);
 }
 
 gboolean file_data_perform_ci(FileData *fd)