fuse4js icon indicating copy to clipboard operation
fuse4js copied to clipboard

chmod() doesn't pass a callback function?

Open TooTallNate opened this issue 10 years ago • 1 comments

I'm getting strange behavior when trying to implement the chmod() function. It only gets passed 2 arguments it seems, the path and mode. But the callback function (expected as 3rd argument) is not there! See log:

  s3fs GETATTR: path='/' key='/' +3s
  s3fs GETATTR: path='/cron.sh' key='/cron.sh' +1ms
  s3fs GETATTR: path='/cron.sh' key='/cron.sh' +66ms
{ '0': '/cron.sh', '1': 33261 }
  s3fs CHMOD: path='/cron.sh' mode=33261 +61ms
chmod() does not pass a cb() function... wtf

Where the code looks something like this (basically a no-op, just with some logging):

function chmod(path, mode, cb) {
  console.error(arguments);
  debug('CHMOD: path=%o mode=%o', path, mode);

  if (cb)
    return cb(0);
  else
    console.error('chmod() does not pass a cb() function... wtf');
}

Any idea what's going on here? Thanks in advance.

/cc @gierschv @bcle

TooTallNate avatar Apr 27 '15 19:04 TooTallNate

I think #36 fixes it…

TooTallNate avatar Apr 27 '15 19:04 TooTallNate