Ticket #4338: clean-appdata.diff

File clean-appdata.diff, 664 bytes (added by Shondoit, 8 years ago)

Proposed fix for cleaning AppData

  • src/vidalia/MainWindow.cpp

    diff --git a/src/vidalia/MainWindow.cpp b/src/vidalia/MainWindow.cpp
    index bbd86d2..0c41ba3 100644
    a b MainWindow::aboutToQuit() 
    386386#if defined(Q_OS_WIN)
    387387    /* Kill any processes which might have been forked off */
    388388    win32_end_process_by_filename(vidalia_settings.getBrowserExecutable());
     389
     390        /* Clean up leftover folders by Firefox */
     391        QDir mozDir(expand_filename("%APPDATA%\\Mozilla"));
     392        if (mozDir.exists()) {
     393                /* Returns false if not empty. We ignore this */
     394                mozDir.cdUp();
     395                mozDir.rmdir("Mozilla");
     396        }
    389397#endif
    390398
    391399    if (_imProcess->state() == QProcess::Running)