Update 'root' item identification handling (#457)

* Add additional check to ensure item root we flag as 'root' is not just name checked as 'root'
This commit is contained in:
abraunegg 2019-04-09 05:05:47 +10:00 committed by GitHub
parent ea2e4a98bf
commit 92d2f14f15
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -634,9 +634,9 @@ final class SyncEngine
if(!isItemDeleted(item)){
// This is not a deleted item
// Test is this is the OneDrive Users Root?
// Use the global's as initialised via init() rather than performing unnecessary additional HTTPS calls
if ((id == defaultRootId) && (item["name"].str == "root")) {
// This IS the OneDrive Root
// Use the global's as initialised via init() rather than performing unnecessary additional HTTPS calls
if ((id == defaultRootId) && (isItemRoot(item)) && (item["name"].str == "root")) {
// This IS a OneDrive Root item
isRoot = true;
}
}