Parse urls with trailing /

This commit is contained in:
woblight
2024-07-28 09:31:33 +02:00
parent 0a4d8780fe
commit 5c026927f9
+3
View File
@@ -384,6 +384,9 @@ void Control::clone(QUrl url, int i)
QString error;
} data;
data.name = url.fileName().section('.',0,0);
if (data.name.isEmpty())
data.name = url.path().split('/', Qt::SkipEmptyParts).last();
if (data.name.isEmpty()) {
data.error = QString("Invalid url.");
return data;