Skip to content

Commit

Permalink
fix: fc10fed
Browse files Browse the repository at this point in the history
  • Loading branch information
renbaoshuo committed Jun 20, 2024
1 parent fc10fed commit 2f3295b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/app/controllers/problem_data_manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function echoFilePre($file_name) {
if ($zip->open($up_filename) === TRUE) {
$zip->extractTo("/var/uoj_data/upload/{$problem['id']}");
$zip->close();
exec("cd /var/uoj_data/upload/{$problem['id']}; if [ -z "`find . -maxdepth 1 -type f`" ]; then for sub_dir in `find -maxdepth 1 -type d ! -name .`; do mv -f \$sub_dir/* . && rm -rf \$sub_dir; done; fi");
exec("cd /var/uoj_data/upload/{$problem['id']}; if [ -z \"`find . -maxdepth 1 -type f`\" ]; then for sub_dir in `find -maxdepth 1 -type d ! -name .`; do mv -f \$sub_dir/* . && rm -rf \$sub_dir; done; fi");
echo "<script>alert('上传成功!')</script>";
} else {
$errmsg = "解压失败!";
Expand Down

0 comments on commit 2f3295b

Please sign in to comment.