fix folder names (#2432)
This commit is contained in:
parent
ab19a89cd2
commit
18b8a0ef5c
1 changed files with 6 additions and 2 deletions
|
@ -271,6 +271,10 @@ void TabDeckStorage::actNewFolder()
|
|||
if (folderName.isEmpty())
|
||||
return;
|
||||
|
||||
// '/' isn't a valid filename character on *nix so we're choosing to replace it with a different arbitrary character.
|
||||
std::string folder = folderName.toStdString();
|
||||
std::replace(folder.begin(), folder.end(), '/', '-');
|
||||
|
||||
QString targetPath;
|
||||
RemoteDeckList_TreeModel::Node *curRight = serverDirView->getCurrentItem();
|
||||
if (!curRight)
|
||||
|
@ -282,8 +286,8 @@ void TabDeckStorage::actNewFolder()
|
|||
|
||||
Command_DeckNewDir cmd;
|
||||
cmd.set_path(targetPath.toStdString());
|
||||
cmd.set_dir_name(folderName.toStdString());
|
||||
|
||||
cmd.set_dir_name(folder);
|
||||
|
||||
PendingCommand *pend = client->prepareSessionCommand(cmd);
|
||||
connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(newFolderFinished(Response, CommandContainer)));
|
||||
client->sendCommand(pend);
|
||||
|
|
Loading…
Reference in a new issue