RSSyl: Lose the .deleted file on folder move for now
authorAndrej Kacian <ticho@claws-mail.org>
Sun, 19 Oct 2014 01:54:04 +0000 (03:54 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Sun, 19 Oct 2014 01:54:04 +0000 (03:54 +0200)
src/plugins/rssyl/rssyl.c

index 928d21c..da71b58 100644 (file)
@@ -808,7 +808,8 @@ static gboolean rssyl_subscribe_uri(Folder *folder, const gchar *uri)
 static void rssyl_copy_private_data(Folder *folder, FolderItem *oldi,
                FolderItem *newi)
 {
-       gchar *dpathold, *dpathnew;
+       gchar *dpathold;
+/*     gchar *dpathnew;*/
        RFolderItem *olditem = (RFolderItem *)oldi,
                                                                        *newitem = (RFolderItem *)newi;
 
@@ -846,11 +847,14 @@ static void rssyl_copy_private_data(Folder *folder, FolderItem *oldi,
 
        dpathold = g_strconcat(rssyl_item_get_path(oldi->folder, oldi),
                        G_DIR_SEPARATOR_S, RSSYL_DELETED_FILE, NULL);
-       dpathnew = g_strconcat(rssyl_item_get_path(newi->folder, newi),
-                       G_DIR_SEPARATOR_S, RSSYL_DELETED_FILE, NULL);
-       move_file(dpathold, dpathnew, TRUE);
+       if (is_file_exist(dpathold)) {
+/*             dpathnew = g_strconcat(rssyl_item_get_path(newi->folder, newi),
+                               G_DIR_SEPARATOR_S, RSSYL_DELETED_FILE, NULL);
+               move_file(dpathold, dpathnew, TRUE);
+               g_free(dpathnew);*/
+               g_remove(dpathold);
+       }
        g_free(dpathold);
-       g_free(dpathnew);
 
 }