Open WolfBearGames opened 6 months ago
This could be another issue, but there are more problems with fs watch on Windows:
As a suggestion: Is it possible to handle all the slash/backslash path "mess" in the socket API so that paths ALWAYS use forward slashes, even on Windows (and all Socket fs/path methods return paths with forward slashes)? I tried converting the windows path to a "normal" path with slashes, but some methods like "path.join" re-introduce backslashes into the resulting path.
What OS are you using (
uname -a
, or Windows version)?Windows 11
What version Socket Runtime are you using?
0.5.4 (f90ba121)
What did you expect to see and what you saw instead?
I'm using fs.watch() to watch a directory and its sub directories for changes. I expect to receive events for changes with the respected path in the event:
{ eventType: 'rename', filename: 'PuzzleNotes\SubTestPuzzle\Textdokument (neu).txt' }
instead, I get this:
{ eventType: 'rename', filename: 'PuzzleNotesSubTestPuzzleTextdokument (neu).txt' }
The directory separators are missing. I did not test on any other platform then Windows, but I could imagine the the \ (backslashes) are being stripped somethere in the ipc communication.