Skip to content

Commit

Permalink
fix: Improve updater api for different versions of php (#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
conde2 authored Oct 1, 2023
1 parent 9640fea commit 2faa0f4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tools/api/updater.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
// CONFIG
$files_dir = "C:/UniServerZ/www/files";
$files_url = "http://localhost/files";
$files_and_dirs = array("init.lua", "data", "modules", "layouts");
$files_dir = "C:/UniServerZ/www/files"; // Directory where the files are located
$files_url = "http://localhost/files"; // Url where the client will download the files
$files_and_dirs = array("init.lua", "data", "modules", "mods");
$checksum_file = "checksums.txt";
$checksum_update_interval = 60; // seconds
$binaries = array(
Expand Down Expand Up @@ -50,7 +50,7 @@ function sendError($error) {
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
$checksum = hash_file("crc32b", $file->getPathname());

if ($checksum === true) {
if ($checksum === true || $checksum != "") {
$parsed_checksum = ltrim($checksum, '0');
if ($parsed_checksum === '') {
$parsed_checksum = '0';
Expand Down

0 comments on commit 2faa0f4

Please sign in to comment.