You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-12 22:57:38 +02:00
All: Fixes #371 (sort of): Allow resources greater than 10 MB but they won't be synced on mobile
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
const { filename, fileExtension } = require('lib/path-utils');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
class FsDriverBase {
|
||||
|
||||
@ -50,6 +51,17 @@ class FsDriverBase {
|
||||
}
|
||||
}
|
||||
|
||||
async waitTillExists(path, timeout = 10000) {
|
||||
const startTime = Date.now();
|
||||
|
||||
while (true) {
|
||||
const e = await this.exists(path);
|
||||
if (e) return true;
|
||||
if (Date.now() - startTime > timeout) return false;
|
||||
await time.msleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = FsDriverBase;
|
Reference in New Issue
Block a user