From 09f6f44b863bc8028e11d45a2c22a5d78a143d62 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 19 May 2020 19:14:53 +0200 Subject: [PATCH] Revert file path empty --- td/telegram/files/FileManager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/td/telegram/files/FileManager.cpp b/td/telegram/files/FileManager.cpp index 8c09555e..bafea60d 100644 --- a/td/telegram/files/FileManager.cpp +++ b/td/telegram/files/FileManager.cpp @@ -661,7 +661,14 @@ int64 FileView::remote_size() const { } string FileView::path() const { - return ""; + switch (node_->local_.type()) { + case LocalFileLocation::Type::Full: + return node_->local_.full().path_; + case LocalFileLocation::Type::Partial: + return node_->local_.partial().path_; + default: + return ""; + } } bool FileView::has_url() const {