Merge pull request #667 from leecannon/master
create entire cache folder path
This commit is contained in:
commit
dac0d9019a
@ -203,7 +203,6 @@ pub fn configChanged(config: *Config, allocator: std.mem.Allocator, builtin_crea
|
||||
config.builtin_path = try std.fs.path.join(allocator, &.{ builtin_creation_dir.?, "builtin.zig" });
|
||||
}
|
||||
|
||||
|
||||
if (null == config.global_cache_path) {
|
||||
const cache_dir_path = (try known_folders.getPath(allocator, .cache)) orelse {
|
||||
logger.warn("Known-folders could not fetch the cache path", .{});
|
||||
@ -213,7 +212,7 @@ pub fn configChanged(config: *Config, allocator: std.mem.Allocator, builtin_crea
|
||||
|
||||
config.global_cache_path = try std.fs.path.resolve(allocator, &[_][]const u8{ cache_dir_path, "zls" });
|
||||
|
||||
std.fs.makeDirAbsolute(config.global_cache_path.?) catch |err| switch(err) {
|
||||
std.fs.cwd().makePath(config.global_cache_path.?) catch |err| switch (err) {
|
||||
error.PathAlreadyExists => {},
|
||||
else => return err,
|
||||
};
|
||||
@ -227,5 +226,4 @@ pub fn configChanged(config: *Config, allocator: std.mem.Allocator, builtin_crea
|
||||
|
||||
try file.writeAll(@embedFile("special/build_runner.zig"));
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user