diff --git a/src/lib/Scanner.ts b/src/lib/Scanner.ts index 223c80d4f3..1c70bc50ca 100644 --- a/src/lib/Scanner.ts +++ b/src/lib/Scanner.ts @@ -65,7 +65,7 @@ export default class Scanner { return } - if (typeof newFolder.parentId === 'undefined' && newFolder.isRoot && newFolder.location === ItemLocation.LOCAL) { + if (newFolder.isRoot && newFolder.location === ItemLocation.LOCAL) { // We can't remove root folders locally return } @@ -76,7 +76,7 @@ export default class Scanner { // created Items // (using map here, because 'each' doesn't provide indices) await Parallel.map(unmatchedChildren, async(newChild, index) => { - if (typeof oldFolder.parentId === 'undefined' && oldFolder.isRoot && oldFolder.location === ItemLocation.LOCAL) { + if (oldFolder.isRoot && oldFolder.location === ItemLocation.LOCAL) { // We can't create root folders locally return } diff --git a/src/lib/browser/BrowserTree.ts b/src/lib/browser/BrowserTree.ts index 4a997f3d06..8148c455db 100644 --- a/src/lib/browser/BrowserTree.ts +++ b/src/lib/browser/BrowserTree.ts @@ -67,7 +67,6 @@ export default class BrowserTree implements IResource { '=>', overrideTitle ) - isRoot = true } } if (node.id === this.absoluteRoot.id) { @@ -242,11 +241,11 @@ export default class BrowserTree implements IResource { const {id, title, parentId} = folder Logger.log('(local)UPDATEFOLDER', folder) if (folder.parentId === this.absoluteRoot.id) { - Logger.log('This action affects the absolute root. Skipping.') + Logger.log('This action affects a root folder. Skipping.') return } if (folder.isRoot) { - Logger.log('This is a root folder. Skip.') + Logger.log('This is the absolute root folder. Skip.') return } try { @@ -273,11 +272,11 @@ export default class BrowserTree implements IResource { const id = folder.id Logger.log('(local)REMOVEFOLDER', id) if (folder.parentId === this.absoluteRoot.id) { - Logger.log('This action affects the absolute root. Skipping.') + Logger.log('This action affects a root folder. Skipping.') return } if (folder.isRoot) { - Logger.log('This is a root folder. Skip.') + Logger.log('This is the root folder. Skip.') return } try {