You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-06-21 23:17:42 +02:00
First pass at linting lib dir
This commit is contained in:
@ -2,7 +2,6 @@ const { filename, fileExtension } = require('lib/path-utils');
|
||||
const { time } = require('lib/time-utils.js');
|
||||
|
||||
class FsDriverBase {
|
||||
|
||||
async isDirectory(path) {
|
||||
const stat = await this.stat(path);
|
||||
return !stat ? false : stat.isDirectory();
|
||||
@ -34,7 +33,7 @@ class FsDriverBase {
|
||||
if (!exists) return nameToTry;
|
||||
nameToTry = nameNoExt + ' (' + counter + ')' + extension;
|
||||
counter++;
|
||||
if (counter >= 1000) nameToTry = nameNoExt + ' (' + ((new Date()).getTime()) + ')' + extension;
|
||||
if (counter >= 1000) nameToTry = nameNoExt + ' (' + new Date().getTime() + ')' + extension;
|
||||
if (counter >= 10000) throw new Error('Cannot find unique title');
|
||||
}
|
||||
}
|
||||
@ -61,7 +60,6 @@ class FsDriverBase {
|
||||
await time.msleep(100);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = FsDriverBase;
|
||||
module.exports = FsDriverBase;
|
||||
|
Reference in New Issue
Block a user