(Fix) Race Condition Downloading Torrent

This commit is contained in:
alkl58
2022-02-28 22:52:37 +01:00
parent 913e25e666
commit 18e744fc1a
+1 -1
View File
@@ -743,7 +743,7 @@ class TorrentController extends Controller
}
// Define the filename for the download
$tmpFileName = \str_replace([' ', '/', '\\'], ['.', '-', '-'], '['.\config('torrent.source').']'.$torrent->name.'.torrent');
$tmpFileName = \str_replace([' ', '/', '\\'], ['.', '-', '-'], '['.\config('torrent.source').']['.$user->id.']'.$torrent->name.'.torrent');
// The torrent file exist ?
if (! \file_exists(\getcwd().'/files/torrents/'.$torrent->file_name)) {