mirror of
https://github.com/tdlight-team/tdlight-telegram-bot-api.git
synced 2024-11-05 11:37:14 +01:00
Fix file_path doesnt exists on getFile method (#55)
* Fix file_path doesnt exists on getFile method This PR fixes file_path doesnt exists on getFile method when localmode enabled and filesize is bigger than limit * added check parameters_->no_file_limit_
This commit is contained in:
parent
de05b42272
commit
ebedcc056b
@ -9076,7 +9076,7 @@ void Client::json_store_file(td::JsonObjectScope &object, const td_api::file *fi
|
||||
}
|
||||
} else {
|
||||
Slice relative_path = td::PathView::relative(file->local_->path_, absolute_dir_, true);
|
||||
if (!relative_path.empty() && file->local_->downloaded_size_ <= MAX_DOWNLOAD_FILE_SIZE) {
|
||||
if (!relative_path.empty() && (parameters_->local_mode_ || parameters_->no_file_limit_ || file->local_->downloaded_size_ <= MAX_DOWNLOAD_FILE_SIZE)) {
|
||||
object("file_path", relative_path);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user