mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-24 21:35:47 +03:00
Use QDir::cleanPath() to get unified input paths.
Paths stored are now always without trailing "/" or double "/" within them.
This commit is contained in:
parent
faf912b29d
commit
b170150db3
1 changed files with 7 additions and 4 deletions
|
@ -274,6 +274,9 @@ void SyncWindow::on_buttonSave_clicked()
|
|||
host.replace("https://","");
|
||||
host.replace("webdav://","");
|
||||
host.replace("webdavs://","");
|
||||
// clean up double or trailing slashes..
|
||||
QString remoteDir = QDir::cleanPath(ui->lineRemoteDir->text());
|
||||
QString localDir = QDir::cleanPath(ui->lineLocalDir->text());
|
||||
if( mEditingConfig >= 0 ) { // Editing an account
|
||||
// If we are renaming the account, make sure that the new name
|
||||
// does not already exist
|
||||
|
@ -288,8 +291,8 @@ void SyncWindow::on_buttonSave_clicked()
|
|||
ui->labelHttp->text()+host,
|
||||
ui->lineUser->text(),
|
||||
ui->linePassword->text(),
|
||||
ui->lineRemoteDir->text(),
|
||||
ui->lineLocalDir->text(),
|
||||
remoteDir,
|
||||
localDir,
|
||||
ui->time->value());
|
||||
}
|
||||
} else { // New account
|
||||
|
@ -302,8 +305,8 @@ void SyncWindow::on_buttonSave_clicked()
|
|||
account->initialize(ui->labelHttp->text()+host,
|
||||
ui->lineUser->text(),
|
||||
ui->linePassword->text(),
|
||||
ui->lineRemoteDir->text(),
|
||||
ui->lineLocalDir->text(),
|
||||
remoteDir,
|
||||
localDir,
|
||||
ui->time->value());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue