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
});
Hello!
I've found this issue when tried to use the
incrementoption. In the empty folder I expect the following code to createfoo.txtfile:But instead it creates
foo (2).txton Windows platform. I dug into the sources and found thefsoption in add-filename-increment library. The following code will work correctly: