From 7890946b18166c9c7fd5527e7253bc07e687cb4f Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 8 May 2021 00:20:04 -0600 Subject: [PATCH] Hotfix in restore discard history of files with same name --- lib/models/discard-history.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/models/discard-history.js b/lib/models/discard-history.js index 3521ae3b81..1af7f263f7 100644 --- a/lib/models/discard-history.js +++ b/lib/models/discard-history.js @@ -127,7 +127,7 @@ export default class DiscardHistory { await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-before-discard`), beforeSha); const commonBasePath = !afterSha ? null : await this.expandBlobToFile(path.join(tempFolderPath, `${filePath}-after-discard`), afterSha); - const resultPath = path.join(tempFolderPath, `~${path.basename(filePath)}-merge-result`); + const resultPath = path.join(tempFolderPath, path.dirname(filePath), `~${path.basename(filePath)}-merge-result`); return {filePath, commonBasePath, theirsPath, resultPath, theirsSha: beforeSha, commonBaseSha: afterSha}; }); return await Promise.all(pathPromises);