diff src/filedata.c @ 896:cf21dc928122

implemented directory rename and delete operations
author nadvornik
date Sun, 20 Jul 2008 11:22:19 +0000
parents 2022112583d0
children 5d9c0b4e6d5f
line wrap: on
line diff
--- a/src/filedata.c	Sun Jul 20 07:52:16 2008 +0000
+++ b/src/filedata.c	Sun Jul 20 11:22:19 2008 +0000
@@ -1551,7 +1551,10 @@
 
 static gboolean file_data_perform_delete(FileData *fd)
 {
-	return unlink_file(fd->path);
+	if (isdir(fd->path) && !islink(fd->path))
+		return rmdir_utf8(fd->path);
+	else
+		return unlink_file(fd->path);
 }
 
 static gboolean file_data_perform_ci(FileData *fd)