diff --git a/.oxrls/.oxrls/882f-useful-mouse.md b/.oxrls/.oxrls/882f-useful-mouse.md new file mode 100644 index 0000000..3b1dba0 --- /dev/null +++ b/.oxrls/.oxrls/882f-useful-mouse.md @@ -0,0 +1,5 @@ +--- +"@bdbchgg/oxrls": "patch" +--- + +Move config to .oxrls/config.json, fix release_dir_abs for nested config \ No newline at end of file diff --git a/.oxrls/.oxrls/aaca-spare-cradle.md b/.oxrls/.oxrls/aaca-spare-cradle.md deleted file mode 100644 index 398f7f0..0000000 --- a/.oxrls/.oxrls/aaca-spare-cradle.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@bdbchgg/oxrls": "patch" ---- - -Move config to .oxrls/config.json, add camelCase rename_all \ No newline at end of file diff --git a/src/config.rs b/src/config.rs index 230ef14..690e109 100644 --- a/src/config.rs +++ b/src/config.rs @@ -226,7 +226,15 @@ impl OxrlsConfig { /// Find the config dir (the release_dir relative to config file location or cwd). pub fn release_dir_abs(&self, config_path: &Path) -> PathBuf { let base = config_path.parent().unwrap_or_else(|| Path::new(".")); - base.join(&self.release_dir) + // If the config is already inside the release directory, use the config's parent directly. + // Otherwise, join the release_dir relative to the config's parent. + let release_path = base.join(&self.release_dir); + if release_path == base { + // Config is inside release dir — don't double-join + base.to_path_buf() + } else { + release_path + } } /// Write config to a file.