Fix issues with configuration directories
- Move the old data directory if possible. - Fix extension path to not use a hard-coded path and instead use the data directory. - Create every part of the path during startup. - Create each path when a connection is made as well in case they are deleted while the server is running. - Create every part of the path before saving settings or writing a file using the resource endpoint.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as path from "path";
|
||||
import * as paths from "./paths";
|
||||
import * as environment from "vs/platform/environment/node/environmentService";
|
||||
|
||||
@@ -5,6 +6,10 @@ export class EnvironmentService extends environment.EnvironmentService {
|
||||
public get sharedIPCHandle(): string {
|
||||
return paths.getSocketPath() || super.sharedIPCHandle;
|
||||
}
|
||||
|
||||
public get extensionsPath(): string {
|
||||
return path.join(paths.getAppDataPath(), "extensions");
|
||||
}
|
||||
}
|
||||
|
||||
const target = environment as typeof environment;
|
||||
|
||||
Reference in New Issue
Block a user