Merge pull request #9834 from shubham2892/input-type-file-treating-packaged-app-as-directory
Fix treat packaged app as directory
This commit is contained in:
commit
959231f766
4 changed files with 7 additions and 1 deletions
|
@ -30,6 +30,7 @@ enum FileDialogProperty {
|
|||
FILE_DIALOG_SHOW_HIDDEN_FILES = 1 << 4,
|
||||
FILE_DIALOG_PROMPT_TO_CREATE = 1 << 5,
|
||||
FILE_DIALOG_NO_RESOLVE_ALIASES = 1 << 6,
|
||||
FILE_DIALOG_TREAT_PACKAGE_APP_AS_DIRECTORY = 1 << 7,
|
||||
};
|
||||
|
||||
typedef base::Callback<void(
|
||||
|
|
|
@ -103,6 +103,8 @@ void SetupDialogForProperties(NSOpenPanel* dialog, int properties) {
|
|||
[dialog setShowsHiddenFiles:YES];
|
||||
if (properties & FILE_DIALOG_NO_RESOLVE_ALIASES)
|
||||
[dialog setResolvesAliases:NO];
|
||||
if (properties & FILE_DIALOG_TREAT_PACKAGE_APP_AS_DIRECTORY)
|
||||
[dialog setTreatsFilePackagesAsDirectories:YES];
|
||||
}
|
||||
|
||||
// Run modal dialog with parent window and return user's choice.
|
||||
|
|
|
@ -46,6 +46,8 @@ The `dialog` module has the following methods:
|
|||
* `noResolveAliases` - Disable the automatic alias (symlink) path
|
||||
resolution. Selected aliases will now return the alias path instead of
|
||||
their target path. _macOS_
|
||||
* `treatPackageAsDirectory` - Treat packages, such as `.app` folders,
|
||||
as a directory instead of a file. _macOS_
|
||||
* `message` String (optional) _macOS_ - Message to display above input
|
||||
boxes.
|
||||
* `callback` Function (optional)
|
||||
|
|
|
@ -11,7 +11,8 @@ const fileDialogProperties = {
|
|||
createDirectory: 1 << 3,
|
||||
showHiddenFiles: 1 << 4,
|
||||
promptToCreate: 1 << 5,
|
||||
noResolveAliases: 1 << 6
|
||||
noResolveAliases: 1 << 6,
|
||||
treatPackageAsDirectory: 1 << 7
|
||||
}
|
||||
|
||||
const messageBoxTypes = ['none', 'info', 'warning', 'error', 'question']
|
||||
|
|
Loading…
Reference in a new issue