diff options
-rw-r--r-- | unotools/source/config/historyoptions.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/unotools/source/config/historyoptions.cxx b/unotools/source/config/historyoptions.cxx index 7899c8670911..e7c28067823d 100644 --- a/unotools/source/config/historyoptions.cxx +++ b/unotools/source/config/historyoptions.cxx @@ -315,7 +315,13 @@ Sequence< Sequence<PropertyValue> > SvtHistoryOptions_Impl::GetList(EHistoryType xOrderList->getByName(OUString::number(nItem)) >>= xSet; xSet->getPropertyValue(s_sHistoryItemRef) >>= sUrl; - if (!sUrl.startsWith("file://") || lcl_fileOpenable(sUrl)) + // Check if file is openable and on a local filesystem. + // Windows UNC pathes like \\server.domain\file.odt map to + // file://server.domain/file.odt. Therefore, we require a beginning + // slash which supprisingly also works for local files on Windows + // as they map to file:///C:/folder/file.odt. Remote files may + // cause hangs if the share is unavailable. See tdf#89394 + if (!sUrl.startsWith("file:///") || lcl_fileOpenable(sUrl)) { xItemList->getByName(sUrl) >>= xSet; seqProperties[s_nOffsetURL ].Value <<= sUrl; |