mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Make sure that paths are loaded/saved using slashes as dir separators.
This commit is contained in:
parent
59b570cf62
commit
e054f63746
2 changed files with 14 additions and 10 deletions
|
@ -589,32 +589,36 @@ void Session::setPreallocationEnabled(bool enabled)
|
||||||
|
|
||||||
QString Session::torrentExportDirectory() const
|
QString Session::torrentExportDirectory() const
|
||||||
{
|
{
|
||||||
return m_torrentExportDirectory;
|
return Utils::Fs::fromNativePath(m_torrentExportDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::setTorrentExportDirectory(const QString &path)
|
void Session::setTorrentExportDirectory(QString path)
|
||||||
{
|
{
|
||||||
|
path = Utils::Fs::fromNativePath(path);
|
||||||
|
if (path != torrentExportDirectory())
|
||||||
m_torrentExportDirectory = path;
|
m_torrentExportDirectory = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Session::finishedTorrentExportDirectory() const
|
QString Session::finishedTorrentExportDirectory() const
|
||||||
{
|
{
|
||||||
return m_finishedTorrentExportDirectory;
|
return Utils::Fs::fromNativePath(m_finishedTorrentExportDirectory);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Session::setFinishedTorrentExportDirectory(const QString &path)
|
void Session::setFinishedTorrentExportDirectory(QString path)
|
||||||
{
|
{
|
||||||
|
path = Utils::Fs::fromNativePath(path);
|
||||||
|
if (path != finishedTorrentExportDirectory())
|
||||||
m_finishedTorrentExportDirectory = path;
|
m_finishedTorrentExportDirectory = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Session::defaultSavePath() const
|
QString Session::defaultSavePath() const
|
||||||
{
|
{
|
||||||
return m_defaultSavePath;
|
return Utils::Fs::fromNativePath(m_defaultSavePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Session::tempPath() const
|
QString Session::tempPath() const
|
||||||
{
|
{
|
||||||
return m_tempPath;
|
return Utils::Fs::fromNativePath(m_tempPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Session::torrentTempPath(const InfoHash &hash) const
|
QString Session::torrentTempPath(const InfoHash &hash) const
|
||||||
|
|
|
@ -231,9 +231,9 @@ namespace BitTorrent
|
||||||
bool isPreallocationEnabled() const;
|
bool isPreallocationEnabled() const;
|
||||||
void setPreallocationEnabled(bool enabled);
|
void setPreallocationEnabled(bool enabled);
|
||||||
QString torrentExportDirectory() const;
|
QString torrentExportDirectory() const;
|
||||||
void setTorrentExportDirectory(const QString &path);
|
void setTorrentExportDirectory(QString path);
|
||||||
QString finishedTorrentExportDirectory() const;
|
QString finishedTorrentExportDirectory() const;
|
||||||
void setFinishedTorrentExportDirectory(const QString &path);
|
void setFinishedTorrentExportDirectory(QString path);
|
||||||
|
|
||||||
int globalDownloadSpeedLimit() const;
|
int globalDownloadSpeedLimit() const;
|
||||||
void setGlobalDownloadSpeedLimit(int limit);
|
void setGlobalDownloadSpeedLimit(int limit);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue