mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
docs: recommend subdirectory for userData to avoid Chromium conflicts (#50563)
Fixes #45414 Storing files directly in the userData root can cause naming conflicts with Chromium's own subdirectories (Cache, GPUCache, Local Storage, etc.). Added a recommendation to use a subdirectory such as path.join(app.getPath('userData'), 'my-app-data') instead. Notes: no-notes
This commit is contained in:
@@ -615,7 +615,11 @@ Returns `string` - The current application directory.
|
||||
by default is the `appData` directory appended with your app's name. By
|
||||
convention files storing user data should be written to this directory, and
|
||||
it is not recommended to write large files here because some environments
|
||||
may backup this directory to cloud storage.
|
||||
may backup this directory to cloud storage. It is recommended to store
|
||||
app-specific files within a subdirectory of `userData` (e.g.,
|
||||
`path.join(app.getPath('userData'), 'my-app-data')`) rather than directly
|
||||
in `userData` itself, to avoid naming conflicts with Chromium's own
|
||||
subdirectories (such as `Cache`, `GPUCache`, and `Local Storage`).
|
||||
* `sessionData` The directory for storing data generated by `Session`, such
|
||||
as localStorage, cookies, disk cache, downloaded dictionaries, network
|
||||
state, DevTools files. By default this points to `userData`. Chromium may
|
||||
|
||||
Reference in New Issue
Block a user