Commit a34df764 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

check if link exists first and delete

parent 8aebf36a
......@@ -72,7 +72,8 @@ if ($cmd=="create_symlink"){
$path = $_GET['path'];
if (is_dir($path)){
//exec("ln -sf $path /www/pages/video;sync");
exec("ln -sf $path /tmp/video");
if (file_exists("/tmp/video")) unlink("/tmp/video");
exec("ln -sf $path /tmp/video");
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment