From d820beb2a751c2c7632ec73b76358290a106383b Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Thu, 13 Mar 2025 16:39:38 -0400 Subject: [PATCH] frontend: Remove move_to_xdg (again) To support upgrades from older versions move_to_xdg was reintroduced for FreeBSD. This has now been available since release 31.0, so users have likely upgraded across this version and it is no longer needed. This reverts commit 39b91d88752699f3f8328b45529f93b511f19c01. --- frontend/obs-main.cpp | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/frontend/obs-main.cpp b/frontend/obs-main.cpp index 93601058f..22ed18969 100644 --- a/frontend/obs-main.cpp +++ b/frontend/obs-main.cpp @@ -304,35 +304,6 @@ static uint64_t convert_log_name(bool has_prefix, const char *name) return std::stoull(timestring.str()); } -/* If upgrading from an older (non-XDG) build of OBS, move config files to XDG directory. */ -/* TODO: Remove after version 32.0. */ -#if defined(__FreeBSD__) -static void move_to_xdg(void) -{ - char old_path[512]; - char new_path[512]; - char *home = getenv("HOME"); - if (!home) - return; - - if (snprintf(old_path, sizeof(old_path), "%s/.obs-studio", home) <= 0) - return; - - /* make base xdg path if it doesn't already exist */ - if (GetAppConfigPath(new_path, sizeof(new_path), "") <= 0) - return; - if (os_mkdirs(new_path) == MKDIR_ERROR) - return; - - if (GetAppConfigPath(new_path, sizeof(new_path), "obs-studio") <= 0) - return; - - if (os_file_exists(old_path) && !os_file_exists(new_path)) { - rename(old_path, new_path); - } -} -#endif - static void delete_oldest_file(bool has_prefix, const char *location) { BPtr logDir(GetAppConfigPathPtr(location)); @@ -920,10 +891,6 @@ int main(int argc, char *argv[]) base_get_log_handler(&def_log_handler, nullptr); -#if defined(__FreeBSD__) - move_to_xdg(); -#endif - obs_set_cmdline_args(argc, argv); for (int i = 1; i < argc; i++) {