Skip to content

chmod() doesn't pass a callback function? #35

@TooTallNate

Description

@TooTallNate

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions