write icon indicating copy to clipboard operation
write copied to clipboard

`increment` doesn't work as expected

Open kbychkov opened this issue 4 years ago • 0 comments

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
});

kbychkov avatar Mar 16 '21 13:03 kbychkov