Skip to content

Commit

Permalink
fix .desktop key/value parser
Browse files Browse the repository at this point in the history
fix #157
  • Loading branch information
rodlie committed May 30, 2021
1 parent 66ecf31 commit cb5c951
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libfm/properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,10 @@ bool Properties::load(const QString &fileName, const QString &group) {

// If we are in correct group and line contains assignment then read data
if (groupFound && line.contains("=")) {
QStringList tmp = line.split("=");
data.insert(tmp.at(0), tmp.at(1));
int index = line.indexOf("=");
QString key = line.mid(0, index);
QString val = line.mid(index+1);
data.insert(key, val);
}
}
file.close();
Expand Down

0 comments on commit cb5c951

Please sign in to comment.