Changeset 3330068
- Timestamp:
- 07/18/2025 08:16:51 AM (7 months ago)
- Location:
- hejbit-decentralised-backup/trunk
- Files:
-
- 3 edited
-
HDB.php (modified) (1 diff)
-
inc/SendChunk.php (modified) (3 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
hejbit-decentralised-backup/trunk/HDB.php
r3320542 r3330068 8 8 * Tested up to: 6.7.2 9 9 * Requires PHP: 7.3 10 * Version: 1.0. 510 * Version: 1.0.6 11 11 * Author: Hejbit, Joaosraposo 12 12 * License: AGPLv3 -
hejbit-decentralised-backup/trunk/inc/SendChunk.php
r3320542 r3330068 67 67 // While the file is not completely read 68 68 if (!empty($thisChunk)) { 69 // Get ACTUAL bytes read (critical fix) 70 $actual_bytes_read = strlen($thisChunk); 71 69 72 // Prepare the headers 70 73 $headers = array( … … 89 92 // Sends the request (creates the chunk file in the UUID folder) 90 93 $firstBit = str_pad($inProgress['fileNumber'], 15, '0', STR_PAD_LEFT); 91 $lastBit = str_pad(($inProgress['fileNumber'] + $memoryFree), 15, '0', STR_PAD_LEFT);94 $lastBit = str_pad(($inProgress['fileNumber'] + $actual_bytes_read), 15, '0', STR_PAD_LEFT); // Use actual bytes 92 95 93 96 $resSendChunk = wp_remote_request( … … 96 99 ); 97 100 98 // Update the database with the new file number99 $data = array("fileNumber" => ($inProgress['fileNumber'] + $memoryFree));101 // Update the database with ACTUAL bytes read (critical fix) 102 $data = array("fileNumber" => ($inProgress['fileNumber'] + $actual_bytes_read)); 100 103 $where = array("finish" => 0); 101 104 $wpdb->update($wpdb->prefix . 'hejbit_saveInProgress', $data, $where); -
hejbit-decentralised-backup/trunk/readme.txt
r3321227 r3330068 3 3 Contributors: joaosraposo, app.hejbit.com , metaprovide.org 4 4 Tested up to: 6.8 5 Stable tag: 1.0. 55 Stable tag: 1.0.6 6 6 Requires PHP: 7.3 7 7 License: AGPLv3
Note: See TracChangeset
for help on using the changeset viewer.