Skip to content
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

GVFS: can't open file #142499

Merged
merged 1 commit into from
Feb 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions src/vs/platform/files/node/diskFileSystemProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -385,14 +385,14 @@ export class DiskFileSystemProvider extends AbstractDiskFileSystemProvider imple

let bytesRead: number | null = null;
try {
const { bytesRead } = await Promises.read(fd, data, offset, length, normalizedPos);

return bytesRead;
bytesRead = (await Promises.read(fd, data, offset, length, normalizedPos)).bytesRead;
} catch (error) {
throw this.toFileSystemProviderError(error);
} finally {
this.updatePos(fd, normalizedPos, bytesRead);
}

return bytesRead;
}

private normalizePos(fd: number, pos: number): number | null {
Expand Down Expand Up @@ -465,14 +465,14 @@ export class DiskFileSystemProvider extends AbstractDiskFileSystemProvider imple

let bytesWritten: number | null = null;
try {
const { bytesWritten } = await Promises.write(fd, data, offset, length, normalizedPos);

return bytesWritten;
bytesWritten = (await Promises.write(fd, data, offset, length, normalizedPos)).bytesWritten;
} catch (error) {
throw await this.toFileSystemProviderWriteError(this.writeHandles.get(fd), error);
} finally {
this.updatePos(fd, normalizedPos, bytesWritten);
}

return bytesWritten;
}

//#endregion
Expand Down