Skip to content

Commit 1be4e64

Browse files
authored
WebAPI: Use native separators for path autofill suggestions
PR qbittorrent#23439. Closes qbittorrent#23432.
1 parent ee62dd3 commit 1be4e64

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/webui/api/appcontroller.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1230,7 +1230,7 @@ void AppController::getDirectoryContentAction()
12301230
const QFileInfo fileInfo = it.nextFileInfo();
12311231
QJsonObject fileObject
12321232
{
1233-
{KEY_FILE_METADATA_NAME, fileInfo.fileName()},
1233+
{KEY_FILE_METADATA_NAME, Path(fileInfo.fileName()).toString()},
12341234
{KEY_FILE_METADATA_CREATION_DATE, Utils::DateTime::toSecsSinceEpoch(fileInfo.birthTime())},
12351235
{KEY_FILE_METADATA_LAST_ACCESS_DATE, Utils::DateTime::toSecsSinceEpoch(fileInfo.lastRead())},
12361236
{KEY_FILE_METADATA_LAST_MODIFICATION_DATE, Utils::DateTime::toSecsSinceEpoch(fileInfo.lastModified())},
@@ -1250,7 +1250,7 @@ void AppController::getDirectoryContentAction()
12501250
}
12511251
else
12521252
{
1253-
ret.append(it.next());
1253+
ret.append(Path(it.next()).toString());
12541254
}
12551255
}
12561256
setResult(ret);

0 commit comments

Comments
 (0)