Skip to content

Commit 8d94dac

Browse files
grep add |
1 parent 7757962 commit 8d94dac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

file_controller.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ void commandsCtrl(const HttpRequestPtr &req, std::function<void(const HttpRespon
145145
result = return_status(result, "mkdir", res_json);
146146
break;
147147
case touch:
148-
if (shell_commands(("ls -l " + std::string(pathvar) + "/../root/" + params1 + " grep ^- ").c_str()).empty())
148+
if (shell_commands(("ls -l " + std::string(pathvar) + "/../root/" + params1 + "| grep ^- ").c_str()).empty())
149149
{
150150
shell_commands(("touch " + std::string(pathvar) + "/../root/" + params1).c_str());
151151
result = "success";

0 commit comments

Comments
 (0)