Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

increment doesn't work as expected #11

Open
kbychkov opened this issue Mar 16, 2021 · 0 comments
Open

increment doesn't work as expected #11

kbychkov opened this issue Mar 16, 2021 · 0 comments

Comments

@kbychkov
Copy link

Hello!

I've found this issue when tried to use the increment option. In the empty folder I expect the following code to create foo.txt file:

write.sync('foo.txt', 'some data', { increment: true });

But instead it creates foo (2).txt on Windows platform. I dug into the sources and found the fs option in add-filename-increment library. The following code will work correctly:

write.sync('foo.txt', 'some data', {
  increment: true,
  fs: true
});
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant