update libs
This commit is contained in:
@@ -10,24 +10,24 @@ namespace AssetStoreTools.Utility
|
||||
{
|
||||
// Get directory info for path outside of the project
|
||||
var absoluteInfo = new DirectoryInfo(folderPathAbsolute);
|
||||
|
||||
|
||||
// Get all directories within the project
|
||||
var allFolderPaths = Directory.GetDirectories("Assets", "*", SearchOption.AllDirectories);
|
||||
foreach (var path in allFolderPaths)
|
||||
{
|
||||
var fullPath = path.Replace("\\", "/");
|
||||
|
||||
|
||||
// Get directory info for one of the paths within the project
|
||||
var relativeInfo = new DirectoryInfo(fullPath);
|
||||
|
||||
|
||||
// Check if project's directory is a symlink
|
||||
if (!relativeInfo.Attributes.HasFlag(FolderSymlinkAttributes))
|
||||
if (!relativeInfo.Attributes.HasFlag(FolderSymlinkAttributes))
|
||||
continue;
|
||||
|
||||
|
||||
// Compare metadata of outside directory with a directories within the project
|
||||
if (!CompareDirectories(absoluteInfo, relativeInfo))
|
||||
if (!CompareDirectories(absoluteInfo, relativeInfo))
|
||||
continue;
|
||||
|
||||
|
||||
// Found symlink within the project, assign it
|
||||
relativePath = fullPath;
|
||||
return true;
|
||||
@@ -36,7 +36,7 @@ namespace AssetStoreTools.Utility
|
||||
relativePath = string.Empty;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private static bool CompareDirectories(DirectoryInfo directory, DirectoryInfo directory2)
|
||||
{
|
||||
var contents = directory.EnumerateFileSystemInfos("*", SearchOption.AllDirectories).GetEnumerator();
|
||||
@@ -53,7 +53,7 @@ namespace AssetStoreTools.Utility
|
||||
if (!firstNext && !secondNext)
|
||||
break;
|
||||
|
||||
var equals = contents.Current?.Name == contents2.Current?.Name
|
||||
var equals = contents.Current?.Name == contents2.Current?.Name
|
||||
&& contents.Current?.LastWriteTime == contents2.Current?.LastWriteTime;
|
||||
|
||||
if (!equals)
|
||||
@@ -62,6 +62,6 @@ namespace AssetStoreTools.Utility
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user