fix(File): Fixed issue with file restore metadata operations.
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/smartbucket',
|
||||
version: '3.3.0',
|
||||
version: '3.3.1',
|
||||
description: 'A TypeScript library offering simple and cloud-agnostic object storage with advanced features like bucket creation, file and directory management, and data streaming.'
|
||||
}
|
||||
|
@@ -145,12 +145,16 @@ export class File {
|
||||
overwrite: false,
|
||||
...optionsArg,
|
||||
};
|
||||
const moveToPath = optionsArg.toPath || (await (await this.getMetaData()).getCustomMetaData({
|
||||
const metadata = await this.getMetaData();
|
||||
const moveToPath = optionsArg.toPath || (await metadata.getCustomMetaData({
|
||||
key: 'recycle'
|
||||
})).originalPath;
|
||||
await metadata.deleteCustomMetaData({
|
||||
key: 'recycle'
|
||||
})
|
||||
await this.move({
|
||||
path: moveToPath,
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user