fix: use safer conversion from QString to filesystem::path

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2025-04-22 11:16:21 +02:00
parent 7c00807de7
commit 4dfe6ae988

View File

@ -543,7 +543,7 @@ bool FileSystem::remove(const QString &fileName, QString *errorString)
#endif
try {
if (!std::filesystem::remove(std::filesystem::path{fileName.toUtf8().data()})) {
if (!std::filesystem::remove(std::filesystem::path{fileName.toStdWString()})) {
if (errorString) {
*errorString = QObject::tr("File is already deleted");
}