2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Revert "Check for local URLs more strictly."

This reverts commit c3fda41224.
This commit is contained in:
John Preston
2024-09-10 14:13:50 +04:00
parent ca3c179b75
commit d1e3b9f15d
7 changed files with 16 additions and 36 deletions

View File

@@ -8,7 +8,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "platform/mac/file_utilities_mac.h"
#include "base/platform/mac/base_utilities_mac.h"
#include "core/mime_type.h"
#include "lang/lang_keys.h"
#include "styles/style_window.h"
@@ -380,9 +379,6 @@ namespace Platform {
namespace File {
QString UrlToLocal(const QUrl &url) {
if (!Core::UrlIsLocal(url)) {
return QString();
}
auto result = url.toLocalFile();
if (result.startsWith(u"/.file/id="_q)) {
NSString *nsurl = [[[NSURL URLWithString: [NSString stringWithUTF8String: (u"file://"_q + result).toUtf8().constData()]] filePathURL] path];