Skip to content

Commit

Permalink
tweak the LibraryType code so as to identify auto-discovered 'Legacy'…
Browse files Browse the repository at this point in the history
… libraries as 'Legacy' instead of 'UNKNOWN' and allow these to be synced -- ONCE WE GET TO ADDING AN EDITOR SO YOU CAN SET/CHANGE THE SYNC TARGET DIRECTORY FOR ANY LIBRARY, that is.
  • Loading branch information
GerHobbelt committed Oct 29, 2020
1 parent 779b6e1 commit d08c017
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
18 changes: 9 additions & 9 deletions Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryDetail.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public string LibraryType()
if (IsIntranetLibrary) return "Intranet";
if (IsBundleLibrary) return "Bundle";
if (IsWebLibrary) return "Web";
return "UNKNOWN";
return "Legacy";
}

#if false
Expand All @@ -99,17 +99,17 @@ public WebLibraryDetail CloneSansLibraryReference()
rv.Description = this.Description;
rv.Deleted = this.Deleted;
//LastSynced
//FolderToWatch
//FolderToWatch
rv.IsLocalGuestLibrary = this.IsLocalGuestLibrary;
//ShortWebId
//IsAdministrator
//ShortWebId
//IsAdministrator
//IsReadOnly
//IntranetPath
//BundleManifestJSON
//LastBundleManifestDownloadTimestampUTC
//LastBundleManifestIgnoreVersion
//IntranetPath
//BundleManifestJSON
//LastBundleManifestDownloadTimestampUTC
//LastBundleManifestIgnoreVersion
rv.IsPurged = this.IsPurged;
//LastServerSyncNotificationDate
//LastServerSyncNotificationDate
rv.AutoSync = false;

return rv;
Expand Down
9 changes: 3 additions & 6 deletions Qiqqa/DocumentLibrary/WebLibraryStuff/WebLibraryManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ private void SaveKnownWebLibraries(string filename = null)
// *** MIGRATION TO OPEN SOURCE CODE ***************************************************************************
// *************************************************************************************************************
// Don't remember the web libraries - let them be discovered by this
if ("UNKNOWN" == web_library_detail.LibraryType())
if ("Legacy" == web_library_detail.LibraryType())
{
continue;
}
Expand Down Expand Up @@ -840,11 +840,8 @@ private void UpdateKnownWebLibrary(WebLibraryDetail new_web_library_detail, bool
old.IsReadOnly = MixOldAndNew(old.IsReadOnly, new_web_library_detail.IsReadOnly, new_web_library_detail.Id + "::" + nameof(old.IsReadOnly), ref state);

// fixup:
if (old.LibraryType() != "UNKNOWN" && old.IsReadOnly)
{
// reset ReadOnly for everyone who is ex-Premium(Plus) for all their known libraries.
old.IsReadOnly = false;
}
// reset ReadOnly for everyone who is ex-Premium(Plus) for all their known libraries.
old.IsReadOnly = false;

old.library?.Dispose();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public string LibraryType()
if (IsIntranetLibrary) return "Intranet";
if (IsBundleLibrary) return "Bundle";
if (IsWebLibrary) return "Web";
return "UNKNOWN";
return "Legacy";
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private void SaveKnownWebLibraries(string filename = null)
// *** MIGRATION TO OPEN SOURCE CODE ***************************************************************************
// *************************************************************************************************************
// Don't remember the web libraries - let them be discovered by this
if ("UNKNOWN" == web_library_detail.LibraryType())
if ("Legacy" == web_library_detail.LibraryType())
{
continue;
}
Expand Down

0 comments on commit d08c017

Please sign in to comment.