diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/kdesktopfile.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/src/core/kdesktopfile.cpp b/src/core/kdesktopfile.cpp index 4a550302..52a97ec7 100644 --- a/src/core/kdesktopfile.cpp +++ b/src/core/kdesktopfile.cpp @@ -83,14 +83,14 @@ QString KDesktopFile::locateLocal(const QString &path)      // Relative to config? (e.g. for autostart)      Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::GenericConfigLocation)) {          if (path.startsWith(dir + plus)) { -            relativePath = dir.mid(path.length() + 1); +            relativePath = path.mid(dir.length() + 1);              return QStandardPaths::writableLocation(QStandardPaths::GenericConfigLocation) + QLatin1Char('/') + relativePath;          }      }      // Relative to xdg data dir? (much more common)      Q_FOREACH (const QString &dir, QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation)) {          if (path.startsWith(dir + plus)) { -            relativePath = dir.mid(path.length() + 1); +            relativePath = path.mid(dir.length() + 1);          }      }      if (relativePath.isEmpty()) { | 
