Skip to content

Commit

Permalink
fix(backend): Fix error file management by verifying correct path
Browse files Browse the repository at this point in the history
  • Loading branch information
nagyszabi authored and burgerni10 committed Feb 10, 2025
1 parent 92caafb commit 89a9892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/service/cache/file-cache.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export default class FileCacheService {
const filenameInfo = path.parse(filePathInCache);
const errorPath = path.resolve(this._errorFolder, filenameInfo.base);
try {
const fileStat = await fs.stat(errorPath);
const fileStat = await fs.stat(path.resolve(filePathInCache));
await fs.rename(filePathInCache, errorPath);
this.triggerRun.emit('cache-size', { cacheSizeToAdd: -fileStat.size, errorSizeToAdd: fileStat.size, archiveSizeToAdd: 0 });
this._logger.warn(`File "${filePathInCache}" moved to "${errorPath}" after ${errorCount} errors`);
Expand Down

0 comments on commit 89a9892

Please sign in to comment.