Browse Source

fix snap file location

main
ghost 1 year ago
parent
commit
1972b3411c
  1. 6
      public/file.php

6
public/file.php

@ -52,6 +52,9 @@ switch ($type) {
// Get snap details from DB // Get snap details from DB
if ($hostPageSnap = $db->getHostPageSnap(!empty($_GET['hps']) ? (int) $_GET['hps'] : 0)) { 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 // Get snap file
foreach (json_decode(SNAP_STORAGE) as $name => $storages) { foreach (json_decode(SNAP_STORAGE) as $name => $storages) {
@ -66,9 +69,6 @@ switch ($type) {
case 'localhost': case 'localhost':
// Get file
$snapFile = 'hp/' . chunk_split($hostPageSnap->hostPageId, 1, '/') . $hostPageSnap->timeAdded . '.zip';
// Download local snap in higher priority if possible // Download local snap in higher priority if possible
if (file_exists($storage->directory . $snapFile) && if (file_exists($storage->directory . $snapFile) &&
is_readable($storage->directory . $snapFile)) { is_readable($storage->directory . $snapFile)) {

Loading…
Cancel
Save