Skip to content

Commit

Permalink
Attempts auto-correct of path for mono unix
Browse files Browse the repository at this point in the history
  • Loading branch information
serialseb committed May 16, 2012
1 parent 59a1308 commit e26864e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/OpenWrap/Build/PackageBuilders/MSBuildPackageBuilder.cs
Expand Up @@ -7,6 +7,7 @@
using Microsoft.Win32;
using OpenFileSystem.IO;
using OpenWrap.Collections;
using OpenWrap.Commands;
using OpenWrap.IO;
using OpenWrap.Runtime;
using Path = System.IO.Path;
Expand Down Expand Up @@ -55,7 +56,13 @@ public override IEnumerable<BuildResult> Build()
{
foreach (var proj in Project)
{
var pathSpec = _environment.DescriptorFile.Parent.Path.Combine(proj).FullPath;
// hacky to account for win32 / unix fs differences
var projectSpec = proj;
if (System.IO.Path.DirectorySeparatorChar != '\\' && projectSpec.Contains('\\'))
{
projectSpec = projectSpec.Replace("\\", Path.DirectorySeparatorChar + "");
}
var pathSpec = _environment.DescriptorFile.Parent.Path.Combine(projectSpec).FullPath;
IEnumerable<IFile> specFiles;
// TODO: Fix OFS. Horribe construction, the Files extension method seems to be buggy as fuck.
try
Expand Down

0 comments on commit e26864e

Please sign in to comment.