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.kaganski@collabora.com>
diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx
index 897e3f5..f96621e 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);
}