mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-07-17 17:42:07 +02:00
Add explicit byte conversion variable to make code more self-documenting
This commit is contained in:
parent
f9530897c0
commit
cb5d9a8287
1 changed files with 2 additions and 1 deletions
|
@ -260,7 +260,8 @@ class BackupManager {
|
||||||
reject(err)
|
reject(err)
|
||||||
})
|
})
|
||||||
archive.on('progress', ({ fs: fsobj }) => {
|
archive.on('progress', ({ fs: fsobj }) => {
|
||||||
if (fsobj.processedBytes > this.serverSettings.maxBackupSize * 1000 * 1000 * 1000) {
|
const maxBackupSizeInBytes = this.serverSettings.maxBackupSize * 1000 * 1000 * 1000
|
||||||
|
if (fsobj.processedBytes > maxBackupSizeInBytes) {
|
||||||
Logger.error(`[BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: ${fsobj.processedBytes}`)
|
Logger.error(`[BackupManager] Archiver is too large - aborting to prevent endless loop, Bytes Processed: ${fsobj.processedBytes}`)
|
||||||
archive.abort()
|
archive.abort()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue