framework/source/uielement/recentfilesmenucontroller.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 866b569b58a13dab2da247aef70822933353663c
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Thu Dec 16 16:51:12 2021 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Thu Dec 16 21:28:09 2021 +0100

    tdf#146219: don't try to detect if a recent file is a directory
    
    This avoids accessing (possibly unavailable) remote URLs,
    when we already know that MRU items are files.
    
    Change-Id: I97e07f007d4129b93b4939311c67cf95de6ff836
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126943
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx 
b/framework/source/uielement/recentfilesmenucontroller.cxx
index 897e3f55a916..f96621ece94b 100644
--- a/framework/source/uielement/recentfilesmenucontroller.cxx
+++ b/framework/source/uielement/recentfilesmenucontroller.cxx
@@ -210,7 +210,9 @@ void RecentFilesMenuController::fillPopupMenu( Reference< 
css::awt::XPopupMenu >
             rPopupMenu->insertItem(sal_uInt16( i+1 ), 
aMenuShortCut.makeStringAndClear(), 0, -1);
 
             if ( bIsIconsAllowed ) {
-                BitmapEx aThumbnail(SvFileInformationManager::GetImageId(aURL, 
false));
+                // tdf#146219: don't use SvFileInformationManager::GetImageId,
+                // which needs to access the URL to detect if it's a directory
+                BitmapEx 
aThumbnail(SvFileInformationManager::GetFileImageId(aURL));
                 rPopupMenu->setItemImage(sal_uInt16(i + 1), 
Graphic(aThumbnail).GetXGraphic(), false);
             }
 

Reply via email to