Skip to content

Commit

Permalink
Update Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
QilongTang committed Oct 25, 2023
1 parent de04a5e commit 60a8189
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ internal virtual void InstallPackage(PackageDownloadHandle packageDownloadHandle
}
}
SetPackageState(packageDownloadHandle, installPath);
// Dispose Index writer to avoid file lock
// Dispose Index writer to avoid file lock after new package is installed
Search.LuceneSearch.LuceneUtilityNodeSearch.DisposeWriter();
Analytics.TrackEvent(Actions.Installed, Categories.PackageManagerOperations, $"{packageDownloadHandle?.Name}");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ private void CommitChanges(object param)
packageLoader.LoadNewCustomNodesAndPackages(newPaths, customNodeManager);
}
packagePathsEnabled.Clear();
// Dispose Index writer to avoid file lock
// Dispose node Index writer to avoid file lock after new package path applied and packages loaded.
Search.LuceneSearch.LuceneUtilityNodeSearch.DisposeWriter();
}

Expand Down
2 changes: 2 additions & 0 deletions src/DynamoUtilities/PathHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public static Exception CreateFolderIfNotExist(string folderPath)
{
try
{
// Do not even try when folder path is null or empty.
// This usually happens when system folder dialog is initialized with empty path
if (string.IsNullOrEmpty(folderPath)) return null;
// When network path is access denied, the Directory.Exits however still
// return true.
Expand Down

0 comments on commit 60a8189

Please sign in to comment.