mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-21 21:48:42 +00:00
style(web/app/controllers): subfolder move command as a single line
8 lines are too much. Why not make it into one line?
This commit is contained in:
parent
a522d58f1d
commit
50f26075ac
@ -58,14 +58,7 @@
|
||||
if ($zip->open($up_filename) === TRUE){
|
||||
$zip->extractTo("/var/uoj_data/upload/{$problem['id']}");
|
||||
$zip->close();
|
||||
exec(
|
||||
<<<EOD
|
||||
cd /var/uoj_data/upload/$problem['id']
|
||||
for sub_dir in `find -maxdepth 1 -type d ! -name .`; do
|
||||
mv -f \$sub_dir/* . && rm -rf \$sub_dir
|
||||
done
|
||||
EOD
|
||||
);
|
||||
exec("cd /var/uoj_data/upload/{$problem['id']}; for sub_dir in `find -maxdepth 1 -type d ! -name .`; do mv -f \$sub_dir/* . && rm -rf \$sub_dir; done");
|
||||
echo "<script>alert('上传成功!')</script>";
|
||||
}else{
|
||||
$errmsg = "解压失败!";
|
||||
|
Loading…
Reference in New Issue
Block a user