summaryrefslogtreecommitdiffstats
path: root/src/gui/dialogs/qfiledialog_mac.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/dialogs/qfiledialog_mac.mm')
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index b07b1ea..f1afaa9 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -284,6 +284,15 @@ QT_USE_NAMESPACE
if ([filename length] == 0)
return NO;
+ // Always accept directories regardless of their names (unless it is a bundle):
+ BOOL isDir;
+ if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) {
+ if ([mSavePanel treatsFilePackagesAsDirectories] == NO) {
+ if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
+ return YES;
+ }
+ }
+
QString qtFileName = QT_PREPEND_NAMESPACE(qt_mac_NSStringToQString)(filename);
QFileInfo info(qtFileName.normalized(QT_PREPEND_NAMESPACE(QString::NormalizationForm_C)));
QString path = info.absolutePath();
@@ -295,15 +304,6 @@ QT_USE_NAMESPACE
if (!mQDirFilterEntryList->contains(info.fileName()))
return NO;
- // Always accept directories regardless of their names (unless it is a bundle):
- BOOL isDir;
- if ([[NSFileManager defaultManager] fileExistsAtPath:filename isDirectory:&isDir] && isDir) {
- if ([mSavePanel treatsFilePackagesAsDirectories] == NO) {
- if ([[NSWorkspace sharedWorkspace] isFilePackageAtPath:filename] == NO)
- return YES;
- }
- }
-
// No filter means accept everything
if (mSelectedNameFilter->isEmpty())
return YES;