Delete old room info and banner files after import
authorArt Cancro <ajc@citadel.org>
Tue, 19 Apr 2016 14:46:44 +0000 (10:46 -0400)
committerArt Cancro <ajc@citadel.org>
Tue, 19 Apr 2016 14:46:44 +0000 (10:46 -0400)
citadel/modules/upgrade/serv_upgrade.c

index d4cd4904b81f380c3c62ffaa22d14972e5bbd94c..d89bf3fd71d57bcc2b13de9111f39cdbaf1408f1 100644 (file)
@@ -248,7 +248,7 @@ void iorarf_oneroom(char *roomname, char *infofile, char *picfile)
                        }
                }
                fclose(fp);
-               // unlink(filename);
+               if (info_msgnum > 0) unlink(infofile);
        }
 
        // Test for the presence of a legacy "room picture file" and import it.
@@ -279,7 +279,7 @@ void iorarf_oneroom(char *roomname, char *infofile, char *picfile)
                        }
                }
                fclose(fp);
-               // unlink(filename);
+               if (pic_msgnum > 0) unlink(picfile);
        }
 
        // Now we have the message numbers of our new banner and icon.  Record them in the room record.