File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 11/** Given an absolute path to a file, mount its containing directory in the
22 * Emscripten virtual filesystem. Only relevant when within the Node.js
3- * environment. If the containing directory already exists with the
4- * Emscripten filesystem, it will not be mounted. */
3+ * environment. */
54Module . mountContainingDir = function ( filePath ) {
65 if ( ! ENVIRONMENT_IS_NODE ) {
76 return
87 }
98 var path = require ( 'path' )
109 var containingDir = path . dirname ( filePath )
11- // If the directory already exists , abort
12- if ( FS . isDir ( containingDir ) || containingDir === '/' ) {
13- return
10+ // If the root , abort
11+ if ( containingDir === '/' ) {
12+ throw new Error ( 'Cannot mount root directory' )
1413 }
1514
1615 var currentDir = '/'
You can’t perform that action at this time.
0 commit comments