mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 04:49:47 -07:00
Move FileSystem utility functions out of misc.h
Use new fs_utils.h instead.
This commit is contained in:
parent
e6e63fa529
commit
0f291629cc
23 changed files with 658 additions and 527 deletions
|
@ -60,6 +60,7 @@
|
|||
#include "propertieswidget.h"
|
||||
#include "qinisettings.h"
|
||||
#include "iconprovider.h"
|
||||
#include "fs_utils.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
|
@ -230,7 +231,7 @@ void TransferListWidget::setSelectedTorrentsLocation() {
|
|||
if (!dir.isNull()) {
|
||||
qDebug("New path is %s", qPrintable(dir));
|
||||
// Check if savePath exists
|
||||
QDir savePath(misc::expandPath(dir));
|
||||
QDir savePath(fsutils::expandPath(dir));
|
||||
qDebug("New path after clean up is %s", qPrintable(savePath.absolutePath()));
|
||||
foreach (const QString & hash, hashes) {
|
||||
// Actually move storage
|
||||
|
@ -587,7 +588,7 @@ void TransferListWidget::askNewLabelForSelection() {
|
|||
invalid = false;
|
||||
const QString label = QInputDialog::getText(this, tr("New Label"), tr("Label:"), QLineEdit::Normal, "", &ok);
|
||||
if (ok && !label.isEmpty()) {
|
||||
if (misc::isValidFileSystemName(label)) {
|
||||
if (fsutils::isValidFileSystemName(label)) {
|
||||
setSelectionLabel(label);
|
||||
} else {
|
||||
QMessageBox::warning(this, tr("Invalid label name"), tr("Please don't use any special characters in the label name."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue