Commit a34df764 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

check if link exists first and delete

parent 8aebf36a
...@@ -72,6 +72,7 @@ if ($cmd=="create_symlink"){ ...@@ -72,6 +72,7 @@ if ($cmd=="create_symlink"){
$path = $_GET['path']; $path = $_GET['path'];
if (is_dir($path)){ if (is_dir($path)){
//exec("ln -sf $path /www/pages/video;sync"); //exec("ln -sf $path /www/pages/video;sync");
if (file_exists("/tmp/video")) unlink("/tmp/video");
exec("ln -sf $path /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