-
Notifications
You must be signed in to change notification settings - Fork 188
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(fs): align storage implementations (#4724)
Co-authored-by: Sergey Petushkov <[email protected]>
- Loading branch information
1 parent
580f4c8
commit 2c91060
Showing
38 changed files
with
1,148 additions
and
382 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
packages/compass-import-export/src/utils/get-user-data-file-path.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import path from 'path'; | ||
import { getStoragePaths } from '@mongodb-js/compass-utils'; | ||
import { getAppName, getStoragePath } from '@mongodb-js/compass-utils'; | ||
|
||
export function getUserDataFolderPath() { | ||
const { appName, basepath } = getStoragePaths() || {}; | ||
const appName = getAppName(); | ||
const basepath = getStoragePath(); | ||
if (appName === undefined || basepath === undefined) { | ||
throw new Error('cannot access user data folder path'); | ||
} | ||
// Todo: https://jira.mongodb.org/browse/COMPASS-7080 | ||
// We should directly call getStoragePaths wherever this function is called. | ||
// It creates nested folder with appName as folder name. | ||
return path.join(basepath, appName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.