浏览代码

Merge pull request #4901 from Feoramund/os2-fixes

Fix a couple bugs in `os2`
gingerBill 6 月之前
父节点
当前提交
a71156699a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      core/os/os2/stat.odin
  2. 1 1
      core/os/os2/user.odin

+ 1 - 1
core/os/os2/stat.odin

@@ -24,7 +24,7 @@ File_Info :: struct {
 @(require_results)
 file_info_clone :: proc(fi: File_Info, allocator: runtime.Allocator) -> (cloned: File_Info, err: runtime.Allocator_Error) {
 	cloned = fi
-	cloned.fullpath = strings.clone(fi.fullpath) or_return
+	cloned.fullpath = strings.clone(fi.fullpath, allocator) or_return
 	cloned.name = filepath.base(cloned.fullpath)
 	return
 }

+ 1 - 1
core/os/os2/user.odin

@@ -49,7 +49,7 @@ user_config_dir :: proc(allocator: runtime.Allocator) -> (dir: string, err: Erro
 			dir = concatenate({dir, "/.config"}, allocator) or_return
 		}
 	case: // All other UNIX systems
-		dir = get_env("XDG_CACHE_HOME", allocator)
+		dir = get_env("XDG_CONFIG_HOME", allocator)
 		if dir == "" {
 			dir = get_env("HOME", temp_allocator())
 			if dir == "" {