···11----
22-"@bdbchgg/oxrls": "patch"
33----
44-55-Fixed a bug where the Changelog headline would not stick at the top of the changelog file
+8-6
src/config.rs
···224224 }
225225226226 /// Find the config dir (the release_dir relative to config file location or cwd).
227227+ /// If the config file is already inside the release directory, returns the
228228+ /// config's parent directory directly to avoid double-joining.
227229 pub fn release_dir_abs(&self, config_path: &Path) -> PathBuf {
228230 let base = config_path.parent().unwrap_or_else(|| Path::new("."));
229229- // If the config is already inside the release directory, use the config's parent directly.
230230- // Otherwise, join the release_dir relative to the config's parent.
231231- let release_path = base.join(&self.release_dir);
232232- if release_path == base {
233233- // Config is inside release dir — don't double-join
231231+ // If the config's parent directory already has the release_dir name, or if
232232+ // the release_dir is ".", use the parent directly.
233233+ if self.release_dir == "." || self.release_dir.is_empty() {
234234+ base.to_path_buf()
235235+ } else if base.file_name().and_then(|n| n.to_str()) == Some(self.release_dir.as_str()) {
234236 base.to_path_buf()
235237 } else {
236236- release_path
238238+ base.join(&self.release_dir)
237239 }
238240 }
239241