You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With broccoli serve, the server can have files open when a rebuild is triggered. Triggering the rebuild causes temporary directories to be deleted. This is no problem on Unix, but on Windows, it appears that we cannot delete a file while it is open. To my understanding, if on Windows we call unlinkSync on a file that is currently open, unlinkSync will return successfully, but the file will continue to exist on the file system until it is closed. Trying to rmdir the containing directory then throws an error. Also, subsequent opens on the file will fail.
I would assume that the correct fix is to close all files that the server has open before starting the rebuild. We are currently using send for serving, and at the moment there doesn't seem to be a way to tell it to close the stream that it opens.
The text was updated successfully, but these errors were encountered:
joliss
changed the title
Concurrent file access with broccoli serve causes errors on Windows
Windows: Concurrent file access with broccoli serveMay 2, 2014
With
broccoli serve
, the server can have files open when a rebuild is triggered. Triggering the rebuild causes temporary directories to be deleted. This is no problem on Unix, but on Windows, it appears that we cannot delete a file while it is open. To my understanding, if on Windows we callunlinkSync
on a file that is currently open,unlinkSync
will return successfully, but the file will continue to exist on the file system until it is closed. Trying tormdir
the containing directory then throws an error. Also, subsequent opens on the file will fail.I would assume that the correct fix is to close all files that the server has open before starting the rebuild. We are currently using send for serving, and at the moment there doesn't seem to be a way to tell it to close the stream that it opens.
Thanks to @krisselden to @stefanpenner for tracking this down. Also see Stef's example gist.
The text was updated successfully, but these errors were encountered: