This commit is contained in:
boufni95 2025-04-10 17:51:35 +00:00
parent c846148b21
commit 75afb82966

View file

@ -317,10 +317,11 @@ class TlvFilesStorageProcessor {
} }
private async handleZipStorages(operation: ZipStoragesOperation) { private async handleZipStorages(operation: ZipStoragesOperation) {
const paths = [] let noAction = true
//const cwd = process.cwd() //const cwd = process.cwd()
const name = crypto.randomBytes(16).toString('hex') + '.zip' const name = crypto.randomBytes(16).toString('hex') + '.zip'
for (const storageName in this.storages) { for (const storageName in this.storages) {
noAction = false
this.storages[storageName].PersistNow() this.storages[storageName].PersistNow()
//paths.push(cwd + '/' + this.storages[storageName].GetStoragePath()) //paths.push(cwd + '/' + this.storages[storageName].GetStoragePath())
const path = this.storages[storageName].GetStoragePath() const path = this.storages[storageName].GetStoragePath()
@ -335,7 +336,7 @@ class TlvFilesStorageProcessor {
} }
} }
if (paths.length === 0) { if (noAction) {
this.sendResponse({ this.sendResponse({
success: false, success: false,
error: 'No storages to zip', error: 'No storages to zip',