diff options
Diffstat (limited to 'fpicker/source/office/iodlg.cxx')
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 514260d359b2..04d57289ede5 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -1823,27 +1823,13 @@ bool SvtFileDialog::PrepareExecute() Reference< XResultSet > xResultSet = aCnt.createCursor( aProps, ::ucbhelper::INCLUDE_FOLDERS_ONLY ); - if ( xResultSet.is() ) + if ( xResultSet.is() && !xResultSet->next() ) { - bool bEmpty = true; - if ( !xResultSet->next() ) - { - // folder is empty - bEmpty = true; - } - else - { - bEmpty = false; - } - - if ( bEmpty ) - { - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, - FpsResId(STR_SVT_NOREMOVABLEDEVICE))); - xBox->run(); - return false; - } + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), + VclMessageType::Warning, VclButtonsType::Ok, + FpsResId(STR_SVT_NOREMOVABLEDEVICE))); + xBox->run(); + return false; } } catch ( ContentCreationException const & ) |