You've already forked joplin
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:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user