Skip to content

Commit

Permalink
also escape single and double quotes
Browse files Browse the repository at this point in the history
This fixes...

incrond[1714]: cannot exec process: Resource temporarily unavailable

... with bad file name due to messing escaping.
  • Loading branch information
eworm-de committed Apr 29, 2022
1 parent 47263e6 commit 23d6206
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions incrontab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ std::string IncronTabEntry::GetSafePath(const std::string& rPath)
SIZE len = rPath.length();
for (SIZE i = 0; i < len; i++) {
if (rPath[i] == ' ' ||
rPath[i] == '\'' ||
rPath[i] == '"' ||
rPath[i] == '\\') {
stream << "\\";
}
Expand Down

0 comments on commit 23d6206

Please sign in to comment.