mirror of
https://github.com/yagop/node-telegram-bot-api
synced 2025-08-22 18:07:16 +00:00
src/telegram: Fix download file path on windows
References: * BR: https://github.com/yagop/node-telegram-bot-api/issues/363 * PR: https://github.com/yagop/node-telegram-bot-api/pull/364 * PR-by: @kucherenkovova
This commit is contained in:
parent
9a4298308e
commit
61e8f85368
@ -1050,7 +1050,7 @@ class TelegramBot extends EventEmitter {
|
||||
.then(fileURI => {
|
||||
const fileName = fileURI.slice(fileURI.lastIndexOf('/') + 1);
|
||||
// TODO: Ensure fileName doesn't contains slashes
|
||||
const filePath = `${downloadDir}/${fileName}`;
|
||||
const filePath = path.join(downloadDir, fileName);
|
||||
|
||||
// properly handles errors and closes all streams
|
||||
return Promise
|
||||
|
Loading…
x
Reference in New Issue
Block a user