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) { @@ -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) { @@ -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)) {

Loading…
Cancel
Save