-
Notifications
You must be signed in to change notification settings - Fork 715
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
When calling create_dir with gdrive as the schema, the directory is not created with an expected name.
I was using the latest Node.js bindings.
Steps to Reproduce
import { Operator } from 'opendal'
const op = new Operator('gdrive', { access_token: '****' })
// a directory with name 'a/' created since Google Drive treats '/' as a valid character for file name
await op.createDir('a/')
// an error occurred:
// Error: NotADirectory (permanent) at create_dir, context: { service: gdrive, path: a } => the path trying to create should end with `/`
await op.createDir('a')There seems to be no way to create a directory whose name does not contain a trailing slash.
Expected Behavior
While calling await op.createDir('a/'), a directory named 'a' rather than 'a/' should be created
Additional Context
No response
Are you willing to submit a PR to fix this bug?
- Yes, I would like to submit a PR.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working