mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: fix copy error (#777)
This commit is contained in:
1 parent
18faad5510
commit
6454e2ed96
2 files changed
+2
-1
No files matched your search
@@ -106,7 +106,7 @@ export class StorageModel {
|
||||
// Make sure id is not used
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
while (await StorageModel.coll.findOne({ _id })) _id = StorageModel.generateId(extname(dst));
|
||||
const result = await storage.copy(value._id, dst);
|
||||
const result = await storage.copy(value._id, _id);
|
||||
const { metaData, size, etag } = await storage.getMeta(_id);
|
||||
await StorageModel.coll.insertOne({
|
||||
_id, meta: metaData, path: dst, size, etag, lastModified: new Date(), owner: value.owner || 1,
|
||||
|
||||
Reference in new issue
Block a user