diff options
author | Greg Munn <greg@sgmunn.com> | 2015-11-30 18:33:28 +0300 |
---|---|---|
committer | Greg Munn <greg@sgmunn.com> | 2015-11-30 18:33:28 +0300 |
commit | dd9eac27415f185587b2927a7819a44fe5836f3f (patch) | |
tree | 94c2269ed4bc45412f3f757603527a84aeb6ac4e /main | |
parent | 98dc2d338ad0fb604cf96d031f0ba063acc2a47e (diff) | |
parent | 235cdc6cc024ceceecae1c9467084b32945168cc (diff) |
Merge pull request #1135 from mono/cycle6-bug35574
[VCS] Fix regression with top menu commands using single file
Diffstat (limited to 'main')
2 files changed, 6 insertions, 7 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs index a8ffdc9e4a..2fc84f82da 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/Commands.cs @@ -37,21 +37,20 @@ namespace MonoDevelop.VersionControl { VersionControlItemList list = new VersionControlItemList (); - WorkspaceItem wob; - SolutionItem sol; + IWorkspaceObject wob; Repository repo = null; wob = IdeApp.ProjectOperations.CurrentSelectedWorkspaceItem; if (wob != null) repo = VersionControlService.GetRepository (wob); if (repo == null) { - sol = IdeApp.ProjectOperations.CurrentSelectedSolutionItem; - if (sol != null) - repo = VersionControlService.GetRepository (sol); + wob = IdeApp.ProjectOperations.CurrentSelectedSolutionItem; + if (wob != null) + repo = VersionControlService.GetRepository (wob); } if (repo == null || repo.VersionControlSystem == null || !repo.VersionControlSystem.IsInstalled) return list; - list.Add (new VersionControlItem (repo, wob, wob.FileName, true, null)); + list.Add (new VersionControlItem (repo, wob, wob.BaseDirectory, true, null)); return list; } diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs index 1650087e48..1ec40961da 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/PublishCommand.cs @@ -57,7 +57,7 @@ namespace MonoDevelop.VersionControl { // Ensure that we strip out all linked files from outside of the solution/projects path. if (entry is IWorkspaceFileObject) - files.AddRange (((IWorkspaceFileObject)entry).GetItemFiles (true).Where (file => file.IsChildPathOf (entry.BaseDirectory))); + files.AddRange (((IWorkspaceFileObject)entry).GetItemFiles (true).Where (file => file.CanonicalPath.IsChildPathOf (entry.BaseDirectory))); } public static bool CanPublish (Repository vc, string path, bool isDir) { |