From 082b5ba78266ad65bcf0a770034d4b78c8d4029c Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Wed, 23 Aug 2023 03:10:06 +0400 Subject: [PATCH] Get rid of sandboxed paths workaround This is fixed in xdg-desktop-portal 1.17. There's no way to check xdg-desktop-portal version so it's either not having support for passing last used path at all in sandbox or encountering the bug on old systems. --- Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp index e3e582459..027f6de91 100644 --- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp +++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp @@ -93,11 +93,6 @@ bool Get( if (parent) { parent = parent->window(); } - // Workaround for sandboxed paths - static const auto docRegExp = QRegularExpression("^/run/user/\\d+/doc"); - if (cDialogLastPath().contains(docRegExp)) { - InitLastPath(); - } return ::FileDialog::internal::GetDefault( parent, files,