Skip to content

Instantly share code, notes, and snippets.

@yak1ex
Created August 7, 2017 06:23
Show Gist options
  • Save yak1ex/79d0acceadcd05eca9a09f7a84b0d534 to your computer and use it in GitHub Desktop.
Save yak1ex/79d0acceadcd05eca9a09f7a84b0d534 to your computer and use it in GitHub Desktop.
nwjs on Win32

nw

/**
 * Patch to circumvent win32 fs locking behavior
 */
if(require('os').platform() === 'win32')
{
  const realFs = require('fs')
  const gracefulFs = require('graceful-fs')
  gracefulFs.gracefulify(realFs)
}

graceful-fs

Need some countermeasure like isaacs/node-graceful-fs#23 This may, however, be time-consuming because there is no delay.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment