Skip to content

Commit

Permalink
fixed for windows file path!
Browse files Browse the repository at this point in the history
  • Loading branch information
toloudis committed May 21, 2024
1 parent 1753304 commit a833946
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion agave_app/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QRegularExpression>

struct ServerParams
{
Expand Down Expand Up @@ -147,7 +148,9 @@ main(int argc, char* argv[])
// remove any leading and trailing double quotes or protocol prefixes
fileToLoad = QUrl::fromPercentEncoding(fileToLoad.toUtf8());
// remove agave:// prefix and trailing slash
fileToLoad = fileToLoad.replace(QRegExp("^agave://|/$"), "");
fileToLoad = fileToLoad.replace(QRegularExpression("^agave://|/$"), "");
// trim any leading or trailing double quotes
fileToLoad = fileToLoad.replace(QRegularExpression("^\"|\"$"), "");
}

QString appPath = QCoreApplication::applicationDirPath();
Expand Down

0 comments on commit a833946

Please sign in to comment.