Skip to content

Commit

Permalink
Latest changes [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
FreeSlave committed Sep 10, 2016
1 parent e4d157f commit 7aeacab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
7 changes: 1 addition & 6 deletions source/desktopfile/file.d
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,7 @@ Type=Directory`;
*/
@safe string[] expandExecValue(in string[] urls = null, string locale = null) const
{
return expandExecArgs(unquoteExec(execValue()), urls, locale);
return expandExecArgs(unquoteExec(execValue()), urls, localizedIconName(locale), localizedDisplayName(locale), fileName());
}

///
Expand All @@ -1141,11 +1141,6 @@ Icon[ru]=folder_ru`;
["quoted program", "--icon", "folder_ru", "-w", "Программа", "-f", "/example.desktop", "one", "two", "one", "one", "one", "two"]);
}

private @safe string[] expandExecArgs(in string[] execArgs, in string[] urls = null, string locale = null) const
{
return .expandExecArgs(execArgs, urls, localizedIconName(locale), localizedDisplayName(locale), fileName());
}

/**
* Starts the application associated with this .desktop file using urls as command line params.
*
Expand Down
8 changes: 4 additions & 4 deletions source/desktopfile/utils.d
Original file line number Diff line number Diff line change
Expand Up @@ -261,15 +261,15 @@ unittest
return value[start..i].unescapeQuotedArgument();
}

string append;
char[] append;
bool wasInQuotes;
while(i < value.length) {
if (value[i] == ' ' || value[i] == '\t') {
if (!wasInQuotes && append.length >= 1 && append[$-1] == '\\') {
append = append[0..$-1] ~ value[i];
append[$-1] = value[i];
} else {
if (append !is null) {
result ~= append;
result ~= append.assumeUnique;
append = null;
}
}
Expand All @@ -285,7 +285,7 @@ unittest
}

if (append !is null) {
result ~= append;
result ~= append.assumeUnique;
}

return result;
Expand Down

0 comments on commit 7aeacab

Please sign in to comment.