From: Flavio Date: Mon, 31 Jan 2011 13:21:31 +0000 (+0100) Subject: username in temp file name X-Git-Tag: 1.4~23 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71f1bab78f2c9819ed6b59558a78b0b95cb171bb;p=minitube username in temp file name --- diff --git a/src/MediaView.cpp b/src/MediaView.cpp index 0fd49b2..613ebec 100644 --- a/src/MediaView.cpp +++ b/src/MediaView.cpp @@ -328,8 +328,13 @@ void MediaView::gotStreamUrl(QUrl streamUrl) { } video->disconnect(this); + QString tempDir = QDesktopServices::storageLocation(QDesktopServices::TempLocation); +#ifdef Q_WS_X11 + QString tempFile = tempDir + "/minitube-" + getenv("USERNAME") + ".mp4"; +#else QString tempFile = tempDir + "/minitube.mp4"; +#endif if (QFile::exists(tempFile) && !QFile::remove(tempFile)) { qDebug() << "Cannot remove temp file"; }