mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 07:46:17 -07:00
Put temp files in .qBittorrent directory. Closes #4462.
This commit is contained in:
parent
d84461c9b2
commit
cffa729ac5
5 changed files with 12 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue