Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Converting path to NPath to perform path equality
Browse files Browse the repository at this point in the history
  • Loading branch information
StanleyGoldman committed Jun 28, 2017
1 parent c0b4bb4 commit 36bf23d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ private static bool ContextMenu_CanLock()

var alreadyLocked = locks.Any(x =>
{
return repositoryPath == x.Path;
return repositoryPath == x.Path.ToNPath();

});
GitFileStatus status = GitFileStatus.None;
if (entries != null)
{
status = entries.FirstOrDefault(x => repositoryPath == x.Path).Status;
status = entries.FirstOrDefault(x => repositoryPath == x.Path.ToNPath()).Status;
}
return !alreadyLocked && status != GitFileStatus.Untracked && status != GitFileStatus.Ignored;
}
Expand Down Expand Up @@ -100,7 +100,7 @@ private static bool ContextMenu_CanUnlock()
NPath assetPath = AssetDatabase.GetAssetPath(selected.GetInstanceID()).ToNPath();
NPath repositoryPath = EntryPoint.Environment.GetRepositoryPath(assetPath);

var isLocked = locks.Any(x => repositoryPath == x.Path);
var isLocked = locks.Any(x => repositoryPath == x.Path.ToNPath());
return isLocked;
}

Expand Down

0 comments on commit 36bf23d

Please sign in to comment.