Skip to content

Commit

Permalink
fix drop files to timeline whose names contain a comma
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Oct 23, 2020
1 parent ac32155 commit f1a4fb7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/docks/timelinedock.cpp
Expand Up @@ -1095,7 +1095,7 @@ static QString convertUrlsToXML(const QString& xml)
LongUiTask longTask(QObject::tr("Drop Files"));
Mlt::Playlist playlist(MLT.profile());
QList<QUrl> urls;
for (const auto& s : xml.split(',')) {
for (const auto& s : xml.split(",file://")) {
QUrl url(s);
urls << Util::removeFileScheme(url);
}
Expand Down Expand Up @@ -1148,7 +1148,7 @@ void TimelineDock::insert(int trackIndex, int position, const QString &xml, bool

// Handle drop from file manager to empty project.
if ((!MLT.producer() || !MLT.producer()->is_valid()) && xml.startsWith("file://")) {
QUrl url = xml.split(',').first();
QUrl url = xml.split(",file://").first();
MAIN.open(Util::removeFileScheme(url), nullptr, false /* play */ );
}

Expand Down Expand Up @@ -1191,7 +1191,7 @@ void TimelineDock::overwrite(int trackIndex, int position, const QString &xml, b

// Handle drop from file manager to empty project.
if ((!MLT.producer() || !MLT.producer()->is_valid()) && xml.startsWith("file://")) {
QUrl url = xml.split(',').first();
QUrl url = xml.split(",file://").first();
MAIN.open(Util::removeFileScheme(url), nullptr, false /* play */ );
}

Expand Down

0 comments on commit f1a4fb7

Please sign in to comment.