Skip to content

Commit da9a6a1

Browse files
committed
fixed Utils.FileSystem overwriting 'fs' module even when 'original-fs' is broken
1 parent 044a235 commit da9a6a1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: util/fileSystem.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ exports.require = function() {
22
var fs = require("fs");
33
if (process.versions['electron']) {
44
try {
5-
fs = require("original-fs")
5+
originalFs = require("original-fs");
6+
if (Object.keys(originalFs).length > 0) {
7+
fs = originalFs;
8+
}
69
} catch (e) {}
710
}
811
return fs

0 commit comments

Comments
 (0)