Skip to content

Commit

Permalink
Fixed watch being completely broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
Martenfur committed Oct 19, 2019
1 parent c6e671a commit bde59ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions NoPipeline/NoPipeline/Content.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public void CheckIntegrity(string rootPath)

DateTime itemLastModified = File.GetLastWriteTime(rootPath + item.Path);

var relativeItemPath = Path.Combine(rootPath + Path.GetDirectoryName(item.Path));
var relativeItemPath = Path.Combine(rootPath, Path.GetDirectoryName(item.Path));

// Watched files are files which aren't tracked by the content pipeline.
// But they are tracked by us! We look which files were recently modified
Expand All @@ -129,9 +129,10 @@ public void CheckIntegrity(string rootPath)

string[] files;

Console.WriteLine("Checking wildcars for: " + Path.Combine(relativeItemPath, filePath));
try
{
files = Directory.GetFiles($"{relativeItemPath}/{filePath}", fileName, SearchOption.AllDirectories);
files = Directory.GetFiles(Path.Combine(relativeItemPath, filePath), fileName, SearchOption.AllDirectories);
}
catch
{
Expand All @@ -148,7 +149,7 @@ public void CheckIntegrity(string rootPath)
if (itemLastModified < fileLastModified || itemLastModified < fileCreationTime)
{
Console.WriteLine("Modifying: " + file);
File.SetLastWriteTime(rootPath + item.Path, DateTime.Now);
File.SetLastWriteTime(Path.Combine(rootPath, item.Path), DateTime.Now);
break;
}
}
Expand Down

0 comments on commit bde59ac

Please sign in to comment.