-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/zkdb as a service #47
Conversation
* @returns Promise<boolean> | ||
*/ | ||
public async isFile(path: string = ''): Promise<boolean> { | ||
const filepath = `${this.pathBase}/${path}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String conjugation produces inconsistent results. We should use path.join instead: path.join(this.pathBase, filePath)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String conjugation produces inconsistent results. We should use path.join instead: path.join(this.pathBase, filePath)
It could be needless for IPFS. At least, I encountered an error suggesting a file didn't exist, even though it does. path.join
helped me to overcome the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
path.join()
used os separator that mean for Windows it would be \
so your path might look like this:
/ipfs\root\{CID}
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Btw, memory is a mock engine for test.
*development branch, otherwise we won't be consistent |
# Conflicts: # packages/zkdb/package-lock.json # packages/zkdb/package.json # packages/zkdb/src/storage-engine/ipfs.ts # packages/zkdb/src/storage-engine/metadata.ts
Feature type
Feature description
Pull request checklist
Please check if your PR fulfills the following requirements: