Skip to content

Commit

Permalink
use unix paths in AssetWatcher.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanwood committed Nov 13, 2024
1 parent abc1ae4 commit 9f2e3a9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/assetpack/src/core/AssetWatcher.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import chokidar from 'chokidar';
import fs from 'fs-extra';
import upath from 'upath';
import { Asset } from './Asset.js';
import { AssetIgnore } from './AssetIgnore.js';
import { deleteAssetFiles } from './AssetPack.js';
Expand Down Expand Up @@ -47,7 +48,7 @@ export class AssetWatcher

constructor(options: AssetWatcherOptions)
{
const entryPath = options.entryPath;
const entryPath = upath.toUnix(options.entryPath);

this._onUpdate = options.onUpdate;
this._onComplete = options.onComplete;
Expand Down Expand Up @@ -188,6 +189,8 @@ export class AssetWatcher
{
changes.forEach(({ type, file }) =>
{
file = upath.toUnix(file);

let asset = this._assetHash[file];

if (type === 'unlink' || type === 'unlinkDir')
Expand Down Expand Up @@ -272,6 +275,8 @@ export class AssetWatcher

files.forEach((file) =>
{
file = upath.toUnix(file);

const fullPath = path.joinSafe(asset.path, file);

if (fullPath.includes('DS_Store')) return;
Expand Down

0 comments on commit 9f2e3a9

Please sign in to comment.