1
0
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:
Laurent Cozic
2019-07-29 15:43:53 +02:00
parent 64b7bc3d62
commit 86dc72b204
170 changed files with 4140 additions and 3119 deletions

View File

@ -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;