Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
Work around shell code in podcast names (#598)
Browse files Browse the repository at this point in the history
  • Loading branch information
Minoru committed Sep 16, 2017
1 parent 1bc93b8 commit c8fea2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/pb_controller.cpp
Expand Up @@ -367,9 +367,9 @@ void pb_controller::play_file(const std::string& file) {
if (player == "")
return;
cmdline.append(player);
cmdline.append(" \"");
cmdline.append(utils::replace_all(file,"\"", "\\\""));
cmdline.append("\"");
cmdline.append(" '");
cmdline.append(utils::replace_all(file,"'", "%27"));
cmdline.append("'");
stfl::reset();
utils::run_interactively(cmdline, "pb_controller::play_file");
}
Expand Down
2 changes: 1 addition & 1 deletion src/queueloader.cpp
Expand Up @@ -130,7 +130,7 @@ std::string queueloader::get_filename(const std::string& str) {
strftime(lbuf, sizeof(lbuf), "%Y-%b-%d-%H%M%S.unknown", localtime(&t));
fn.append(lbuf);
} else {
fn.append(base);
fn.append(utils::replace_all(base, "'", "%27"));
}
return fn;
}
Expand Down

0 comments on commit c8fea2f

Please sign in to comment.