mirror of
https://github.com/fuse-friends/fuse-native
synced 2024-10-27 18:34:01 +00:00
fixes on Windows for example
This commit is contained in:
parent
84b17e1efa
commit
cc81654ac1
12
example.js
12
example.js
@ -1,6 +1,6 @@
|
||||
var fuse = require('./')
|
||||
|
||||
var mountPath = process.platform ? './mnt' : 'M:\\';
|
||||
var mountPath = process.platform !== 'win32' ? './mnt' : 'M:\\';
|
||||
|
||||
fuse.mount(mountPath, {
|
||||
readdir: function (path, cb) {
|
||||
@ -17,8 +17,8 @@ fuse.mount(mountPath, {
|
||||
ctime: new Date(),
|
||||
size: 100,
|
||||
mode: 16877,
|
||||
uid: process.getuid(),
|
||||
gid: process.getgid()
|
||||
uid: process.getuid ? process.getuid() : 0,
|
||||
gid: process.getgid ? process.getgid() : 0
|
||||
})
|
||||
return
|
||||
}
|
||||
@ -29,9 +29,9 @@ fuse.mount(mountPath, {
|
||||
atime: new Date(),
|
||||
ctime: new Date(),
|
||||
size: 12,
|
||||
mode: 33188,
|
||||
uid: process.getuid(),
|
||||
gid: process.getgid()
|
||||
mode: 188,
|
||||
uid: process.getuid ? process.getuid() : 0,
|
||||
gid: process.getgid ? process.getgid() : 0
|
||||
})
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user