Delete old room info and banner files after import
[citadel.git] / 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.