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())
|
if (folderName.isEmpty())
|
||||||
return;
|
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;
|
QString targetPath;
|
||||||
RemoteDeckList_TreeModel::Node *curRight = serverDirView->getCurrentItem();
|
RemoteDeckList_TreeModel::Node *curRight = serverDirView->getCurrentItem();
|
||||||
if (!curRight)
|
if (!curRight)
|
||||||
|
@ -282,7 +286,7 @@ void TabDeckStorage::actNewFolder()
|
||||||
|
|
||||||
Command_DeckNewDir cmd;
|
Command_DeckNewDir cmd;
|
||||||
cmd.set_path(targetPath.toStdString());
|
cmd.set_path(targetPath.toStdString());
|
||||||
cmd.set_dir_name(folderName.toStdString());
|
cmd.set_dir_name(folder);
|
||||||
|
|
||||||
PendingCommand *pend = client->prepareSessionCommand(cmd);
|
PendingCommand *pend = client->prepareSessionCommand(cmd);
|
||||||
connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(newFolderFinished(Response, CommandContainer)));
|
connect(pend, SIGNAL(finished(Response, CommandContainer, QVariant)), this, SLOT(newFolderFinished(Response, CommandContainer)));
|
||||||
|
|
Loading…
Reference in a new issue