diff --git a/public/file.php b/public/file.php index 56ceb59..6f5b074 100644 --- a/public/file.php +++ b/public/file.php @@ -52,6 +52,9 @@ switch ($type) { // Get snap details from DB if ($hostPageSnap = $db->getHostPageSnap(!empty($_GET['hps']) ? (int) $_GET['hps'] : 0)) { + // Get file + $snapFile = 'hp/' . chunk_split($hostPageSnap->hostPageId, 1, '/') . $hostPageSnap->timeAdded . '.zip'; + // Get snap file foreach (json_decode(SNAP_STORAGE) as $name => $storages) { @@ -66,9 +69,6 @@ switch ($type) { case 'localhost': - // Get file - $snapFile = 'hp/' . chunk_split($hostPageSnap->hostPageId, 1, '/') . $hostPageSnap->timeAdded . '.zip'; - // Download local snap in higher priority if possible if (file_exists($storage->directory . $snapFile) && is_readable($storage->directory . $snapFile)) {