fix announce for directory change

This commit is contained in:
xiaomlove
2021-01-19 21:50:21 +08:00
parent a5eaad9036
commit b3d99612a1
15 changed files with 29 additions and 26 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ else{
$res = sql_query("SELECT name, filename, save_as, size, owner,banned FROM torrents WHERE id = ".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
$row = mysql_fetch_assoc($res);
$fn = "$torrent_dir/$id.torrent";
$fn = ROOT_PATH . "$torrent_dir/$id.torrent";
if ($CURUSER['downloadpos']=="no")
permissiondenied();
if (!$row || !is_file($fn) || !is_readable($fn))