1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-06-15 23:00:36 +02:00

All: Save size of a resource to the database; and added mechanism to run non-database migrations

This commit is contained in:
Laurent Cozic
2019-05-11 17:55:40 +01:00
parent e96bc9c48a
commit 9c85bc2cd1
11 changed files with 128 additions and 3 deletions

View File

@ -166,9 +166,10 @@ function shimInit() {
resource = Object.assign({}, resource, defaultProps);
}
resource = await Resource.save(resource, { isNew: true });
const fileStat = await shim.fsDriver().stat(targetPath);
resource.size = fileStat.size;
console.info(resource);
resource = await Resource.save(resource, { isNew: true });
return resource;
}