Skip to content

Commit 85da6d7

Browse files
committed
libfm: fix file path in openInApp, #34
1 parent 05c65b6 commit 85da6d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libfm/mimeutils.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ void MimeUtils::openInApp(QString exe, const QFileInfo &file,
134134
// Replace parameters with file name. If there are no parameters simply append
135135
// file name to the end of argument list
136136
if (args.toLower().contains("%f")) {
137-
args.replace("%f", file.filePath(), Qt::CaseInsensitive);
137+
args.replace("%f", "\"" + file.filePath() + "\"", Qt::CaseInsensitive);
138138
} else if (args.toLower().contains("%u")) {
139-
args.replace("%u", file.filePath(), Qt::CaseInsensitive);
139+
args.replace("%u", "\"" + file.filePath() + "\"", Qt::CaseInsensitive);
140140
} else {
141141
args.append(args.isEmpty() ? "" : " ");
142-
args.append(/*"\"" + */file.filePath()/* + "\""*/);
142+
args.append("\"" + file.filePath() + "\"");
143143
}
144144

145145
qDebug() << "qprocess start detached" << name << args;

0 commit comments

Comments
 (0)