mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Create the azure folder differently. (#7470)
Create the folder with a different mechanism.
This commit is contained in:
@@ -84,15 +84,29 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||||||
|
|
||||||
// Create the folder for storing the token caches
|
// Create the folder for storing the token caches
|
||||||
async function findOrMakeStoragePath() {
|
async function findOrMakeStoragePath() {
|
||||||
let storagePath = path.join(getDefaultLogLocation(), constants.extensionName);
|
let defaultLogLocation = getDefaultLogLocation();
|
||||||
|
let storagePath = path.join(defaultLogLocation, constants.extensionName);
|
||||||
|
|
||||||
|
try {
|
||||||
|
await fs.mkdir(defaultLogLocation, { recursive: true });
|
||||||
|
} catch (e) {
|
||||||
|
if (e.code !== 'EEXIST') {
|
||||||
|
console.log(`Creating the base directory failed... ${e}`);
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await fs.mkdir(storagePath, { recursive: true });
|
await fs.mkdir(storagePath, { recursive: true });
|
||||||
console.log('Initialized Azure account extension storage.');
|
} catch (e) {
|
||||||
}
|
if (e.code !== 'EEXIST') {
|
||||||
catch (e) {
|
console.error(`Initialization of Azure account extension storage failed: ${e}`);
|
||||||
console.error(`Initialization of Azure account extension storage failed: ${e}`);
|
console.error('Azure accounts will not be available');
|
||||||
console.error('Azure accounts will not be available');
|
return undefined;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('Initialized Azure account extension storage.');
|
||||||
return storagePath;
|
return storagePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user