Skip to content

Commit

Permalink
fix example lint
Browse files Browse the repository at this point in the history
  • Loading branch information
codebytere committed Jun 22, 2019
1 parent c5df623 commit d2d4ebc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/api/app.md
Original file line number Diff line number Diff line change
Expand Up @@ -1241,13 +1241,13 @@ method returns false. If we fail to perform the copy, then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong.

By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the the previously active app will quit itself. This behavior can be changed by invoking the optional callback handler, where the boolean returned by the handler determines whether or not the move proceeds with its default behavior.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the the previously active app will quit itself. This behavior can be changed by invoking the optional callback handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior.

For example:

```js
app.moveToApplicationsFolder({
conflictHandler: (conflictType) => {
conflictHandler: conflictType => {
if (conflictType === 'exists') {
dialog.showMessageBoxSync({
type: 'question',
Expand All @@ -1256,11 +1256,11 @@ app.moveToApplicationsFolder({
message: 'An app of this name already exists'
}, response => response)
}
})
}
})
```

Would mean that if an app already exists in the user directory, if the user chooses to 'Continue Move' then the function would continue with its default behavior and the existing app will be trashed and the active app moved into its place.
In the above example, if an app already exists in the user directory and user chooses to 'Continue Move' then the function would proceed with default behavior: and the existing app will be trashed and the active app moved into its place.

## Properties

Expand Down

0 comments on commit d2d4ebc

Please sign in to comment.