mafintosh / torrent-stream

The low level streaming torrent engine that peerflix uses
MIT License
1.94k stars 227 forks source link

use `os.tmpdir()` in case `os.tmpDir()` is unavailable #208

Closed novalagung closed 3 years ago

novalagung commented 3 years ago

in node14 the os.tmpDir() is completelly removed, and replaced with os.tmpdir() function. in this PR, I added a ternary to use os.tmdir() if it is available, otherwise the old os.tmpDir() will be used. this workaround will make the code work on both node14 or any other versions before that.

novalagung commented 3 years ago

a friendly ping for maintainer @mafintosh

this PR might resolve a lot of people's problems. torrent-stream and other libraries that use torrent-stream as dependency are completely not working on node v14.

the changes I made on this PR is compatible across any node versions.

mafintosh commented 3 years ago

Thats awesome!

mafintosh commented 3 years ago

1.2.1