Merge pull request #12049 from meteor/fix/watching-windows-paths

Fix win style paths being added to watch sets
This commit is contained in:
Denilson
2022-05-31 10:05:21 -04:00
committed by GitHub
2 changed files with 1 additions and 5 deletions

View File

@@ -843,10 +843,6 @@ export function readAndWatchDirectory(
// Calculating the sha hash can be expensive for large files. By
// returning the calculated hash along with the file contents, the
// hash doesn't need to be calculated again for static files.
//
// We only calculate the hash if needed here, so callers must not
// *rely* on the hash being returned; merely that if the hash is
// present, it is the correct hash of the contents.
export function readAndWatchFileWithHash(watchSet: WatchSet, absPath: string) {
const result: {
contents: string | Buffer | null;

View File

@@ -304,7 +304,7 @@ class InputFile extends buildPluginModule.InputFile {
const sourceBatch = this._resourceSlot.packageSourceBatch;
return readAndWatchFileWithHash(
sourceBatch.unibuild.watchSet,
files.convertToOSPath(path),
files.convertToPosixPath(path),
);
}