mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Merge pull request #5987 from Chocobo1/temp_dir
Put temp files in .qBittorrent directory
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <QTimer>
|
||||
|
||||
#include "base/preferences.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "websessiondata.h"
|
||||
#include "abstractwebapplication.h"
|
||||
|
||||
@@ -382,7 +383,7 @@ bool AbstractWebApplication::sessionEnd()
|
||||
|
||||
QString AbstractWebApplication::saveTmpFile(const QByteArray &data)
|
||||
{
|
||||
QTemporaryFile tmpfile(QDir::temp().absoluteFilePath("qBT-XXXXXX.torrent"));
|
||||
QTemporaryFile tmpfile(Utils::Fs::tempPath() + "XXXXXX.torrent");
|
||||
tmpfile.setAutoRemove(false);
|
||||
if (tmpfile.open()) {
|
||||
tmpfile.write(data);
|
||||
|
||||
Reference in New Issue
Block a user