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

All: Add mechanism to lock and upgrade sync targets (#3524)

This commit is contained in:
Laurent
2020-08-02 12:28:50 +01:00
committed by GitHub
parent 88f22fabf7
commit 0c147236a3
138 changed files with 3686 additions and 647 deletions

View File

@ -128,6 +128,8 @@ class FileApi {
if (!options) options = {};
if (!('includeHidden' in options)) options.includeHidden = false;
if (!('context' in options)) options.context = null;
if (!('includeDirs' in options)) options.includeDirs = true;
if (!('syncItemsOnly' in options)) options.syncItemsOnly = false;
this.logger().debug(`list ${this.baseDir()}`);
@ -141,6 +143,14 @@ class FileApi {
result.items = temp;
}
if (!options.includeDirs) {
result.items = result.items.filter(f => !f.isDir);
}
if (options.syncItemsOnly) {
result.items = result.items.filter(f => !f.isDir && BaseItem.isSystemPath(f.path));
}
return result;
}