Przeglądaj źródła

UI: Make XDG config path first if moving to XDG

jp9000 10 lat temu
rodzic
commit
d3ba8c8af4
1 zmienionych plików z 7 dodań i 0 usunięć
  1. 7 0
      obs/obs-app.cpp

+ 7 - 0
obs/obs-app.cpp

@@ -1075,6 +1075,13 @@ static void move_to_xdg(void)
 
 	if (snprintf(old_path, 512, "%s/.obs-studio", home) <= 0)
 		return;
+
+	/* make base xdg path if it doesn't already exist */
+	if (GetConfigPath(new_path, 512, "") <= 0)
+		return;
+	if (os_mkdirs(new_path) == MKDIR_ERROR)
+		return;
+
 	if (GetConfigPath(new_path, 512, "obs-studio") <= 0)
 		return;