Revision 1794 trunk/client/gui_qt/AutoImport.cpp

AutoImport.cpp (revision 1794)
92 92

                
93 93
    QString msg = tr("The file '%1'\nwas successfully imported with the collection name '%2'").arg(path, collection_name);
94 94
    mainwindow->showNotification(tr("NZB File Imported"), msg);
95

                
96
    /* Remove or move the file if necessary */
97
    QNNTPGrabGlue::ConfigOpts opts = glue->configGetOpts();
98
    if (opts.move_file_after_auto_import) {
99
        /* Create a folder named 'Imported' and move the file there */
100
         QDir d;
101
         QFileInfo info(file);
102
         d.mkdir(info.canonicalPath() + "/Imported");
103
         file.rename(info.canonicalPath() + "/Imported/" + info.fileName());
104
    } else {
105
        /* Remove the file */
106
        file.remove();
107
    }
95 108
}
96 109

                
97 110
void AutoImport::onPluginEvent(QString plugin_name, QString event_name, QList args)

Also available in: Unified diff