mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
- Remember last save directory in torrent addition dialog
This commit is contained in:
parent
b93ac6f9af
commit
e9ab599260
2 changed files with 28 additions and 8 deletions
11
src/GUI.cpp
11
src/GUI.cpp
|
@ -1112,11 +1112,12 @@ void GUI::askForTorrents(){
|
|||
}
|
||||
}
|
||||
// Save last dir to remember it
|
||||
lastDirFile.open(QIODevice::WriteOnly | QIODevice::Text);
|
||||
QStringList top_dir = pathsList.at(0).split(QDir::separator());
|
||||
top_dir.removeLast();
|
||||
lastDirFile.write(top_dir.join(QDir::separator()).toUtf8());
|
||||
lastDirFile.close();
|
||||
if(lastDirFile.open(QIODevice::WriteOnly | QIODevice::Text)){
|
||||
QStringList top_dir = pathsList.at(0).split(QDir::separator());
|
||||
top_dir.removeLast();
|
||||
lastDirFile.write(top_dir.join(QDir::separator()).toUtf8());
|
||||
lastDirFile.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue