comparison 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
comparison
equal deleted inserted replaced
895:b48c366d5707 896:cf21dc928122
1549 return copy_file(fd->change->source, fd->change->dest); 1549 return copy_file(fd->change->source, fd->change->dest);
1550 } 1550 }
1551 1551
1552 static gboolean file_data_perform_delete(FileData *fd) 1552 static gboolean file_data_perform_delete(FileData *fd)
1553 { 1553 {
1554 return unlink_file(fd->path); 1554 if (isdir(fd->path) && !islink(fd->path))
1555 return rmdir_utf8(fd->path);
1556 else
1557 return unlink_file(fd->path);
1555 } 1558 }
1556 1559
1557 static gboolean file_data_perform_ci(FileData *fd) 1560 static gboolean file_data_perform_ci(FileData *fd)
1558 { 1561 {
1559 FileDataChangeType type = fd->change->type; 1562 FileDataChangeType type = fd->change->type;