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

copyFileSync expected behavior? #15770

Closed
favio41 opened this issue Oct 4, 2017 · 2 comments
Closed

copyFileSync expected behavior? #15770

favio41 opened this issue Oct 4, 2017 · 2 comments
Labels
fs Issues and PRs related to the fs subsystem / file system.

Comments

@favio41
Copy link

favio41 commented Oct 4, 2017

  • Version:8.6.0
  • Platform: 16.04.1-Ubuntu
  • Subsystem:fs

I'm getting what I think is an unexpected behavior when I use this function

const fs = require('fs');
fs.copyFileSync('numeric.log', 'alpha.log');

using this files:
numeric.log:

1
2
3

alpha.log

a
b
c
d
e

I'm expecting a full rewrite of my destination file, but instead, I get:
alpha.log

1
2
3
d
e

Is this the intended behavior? If yes I recommend this should be disclosed on the docs.

Thank you!

@santigimeno
Copy link
Member

I think this should be fixed once #15745 lands. See: libuv/libuv#1552

@favio41
Copy link
Author

favio41 commented Oct 4, 2017

Yes, it sounds like that. I will wait for the new release.

Thank you for your quick response!

@mscdex mscdex added fs Issues and PRs related to the fs subsystem / file system. question Issues that look for answers. and removed question Issues that look for answers. labels Oct 4, 2017
@cjihrig cjihrig closed this as completed in 75318e4 Oct 5, 2017
Trott pushed a commit to Trott/io.js that referenced this issue Oct 5, 2017
PR-URL: nodejs#15745
Refs: nodejs#15380
Refs: nodejs#15683
Fixes: nodejs#15394
Fixes: nodejs#15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 7, 2017
PR-URL: #15745
Refs: #15380
Refs: #15683
Fixes: #15394
Fixes: #15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 11, 2017
PR-URL: #15745
Refs: #15380
Refs: #15683
Fixes: #15394
Fixes: #15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
addaleax pushed a commit to addaleax/ayo that referenced this issue Oct 12, 2017
PR-URL: nodejs/node#15745
Refs: nodejs/node#15380
Refs: nodejs/node#15683
Fixes: nodejs/node#15394
Fixes: nodejs/node#15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 17, 2017
PR-URL: #15745
Refs: #15380
Refs: #15683
Fixes: #15394
Fixes: #15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
MylesBorins pushed a commit that referenced this issue Oct 25, 2017
PR-URL: #15745
Refs: #15380
Refs: #15683
Fixes: #15394
Fixes: #15770
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system.
Projects
None yet
Development

No branches or pull requests

3 participants