backup: fix listDir to return path instead of fullPath

This commit is contained in:
Girish Ramakrishnan
2025-08-02 10:24:51 +02:00
parent c935744f4c
commit 4fcaae8053
6 changed files with 25 additions and 26 deletions
+3 -4
View File
@@ -123,7 +123,7 @@ describe('Storage', function () {
}
const expectedFiles = execSync(`find . -type f -printf '%P\n'`, { cwd: sourceDir, encoding: 'utf8' }).trim().split('\n');
expect(allFiles.map(function (f) { return f.fullPath; }).sort()).to.eql(expectedFiles.sort());
expect(allFiles.map(function (f) { return f.path; }).sort()).to.eql(expectedFiles.sort());
});
it('can copy', async function () {
@@ -295,7 +295,7 @@ describe('Storage', function () {
marker = result.marker;
}
expect(allFiles.map(function (f) { return f.fullPath; })).to.contain('uploadtest/test.txt');
expect(allFiles.map(function (f) { return f.path; })).to.contain('uploadtest/test.txt');
});
it('can copy', async function () {
@@ -344,7 +344,6 @@ describe('Storage', function () {
function getFullWritablePath(key) {
const fullPath = path.join(bucketPathNoPrefix, key);
fs.mkdirSync(path.dirname(fullPath), { recursive: true });
console.log(fullPath);
return fullPath;
}
@@ -433,7 +432,7 @@ describe('Storage', function () {
marker = result.marker;
}
expect(allFiles.map(function (f) { return f.fullPath; })).to.contain('uploadtest/test.txt');
expect(allFiles.map(function (f) { return f.path; })).to.contain('uploadtest/test.txt');
});
it('can copy', async function () {