Commit 33ab39a4 authored by Urs Fleisch's avatar Urs Fleisch
Browse files

Fix dropping of local files on Windows.

parent 6f0255a5
......@@ -1871,13 +1871,8 @@ void Kid3Application::openDrop(const QStringList& paths)
if (lfPos > 0 && lfPos < static_cast<int>(txt.length()) - 1) {
txt.truncate(lfPos + 1);
}
QUrl url = QUrl::fromLocalFile(txt);
if (!url.path().isEmpty()) {
#ifdef Q_OS_WIN32
QString dir = url.toString();
#else
QString dir = url.path().trimmed();
#endif
QString dir = txt.trimmed();
if (!dir.isEmpty()) {
if (dir.endsWith(QLatin1String(".jpg"), Qt::CaseInsensitive) ||
dir.endsWith(QLatin1String(".jpeg"), Qt::CaseInsensitive) ||
dir.endsWith(QLatin1String(".png"), Qt::CaseInsensitive)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment