fix: fall back to default logs path in getPath('logs') (#19653)
This commit is contained in:
parent
0851697cb7
commit
1dc02e6dbc
7 changed files with 89 additions and 19 deletions
|
@ -582,7 +582,7 @@ them.
|
|||
|
||||
Sets or creates a directory your app's logs which can then be manipulated with `app.getPath()` or `app.setPath(pathName, newPath)`.
|
||||
|
||||
Calling `app.setAppLogsPath()` without a `path` parameter will result in this directory being set to `/Library/Logs/YourAppName` on _macOS_, and inside the `userData` directory on _Linux_ and _Windows_.
|
||||
Calling `app.setAppLogsPath()` without a `path` parameter will result in this directory being set to `~/Library/Logs/YourAppName` on _macOS_, and inside the `userData` directory on _Linux_ and _Windows_.
|
||||
|
||||
### `app.getAppPath()`
|
||||
|
||||
|
@ -614,6 +614,8 @@ Returns `String` - The current application directory.
|
|||
Returns `String` - A path to a special directory or file associated with `name`. On
|
||||
failure, an `Error` is thrown.
|
||||
|
||||
If `app.getPath('logs')` is called without called `app.setAppLogsPath()` being called first, a default log directory will be created equivalent to calling `app.setAppLogsPath()` without a `path` parameter.
|
||||
|
||||
### `app.getFileIcon(path[, options])`
|
||||
|
||||
* `path` String
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue