Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d1cd117

Browse filesBrowse files
Trotttargos
authored andcommitted
test: address deprecation warning
fs.truncateSync() emits a deprecation warning when called with a file descriptor. Move to fs.ftruncateSync(). PR-URL: #38448 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
1 parent a696f10 commit d1cd117
Copy full SHA for d1cd117

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎test/pummel/test-fs-largefile.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-fs-largefile.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const fd = fs.openSync(filepath, 'w+');
3434
const offset = 5 * 1024 * 1024 * 1024; // 5GB
3535
const message = 'Large File';
3636

37-
fs.truncateSync(fd, offset);
37+
fs.ftruncateSync(fd, offset);
3838
assert.strictEqual(fs.statSync(filepath).size, offset);
3939
const writeBuf = Buffer.from(message);
4040
fs.writeSync(fd, writeBuf, 0, writeBuf.length, offset);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.