fix: guard content commits and settle dependency constraints
This commit is contained in:
1 parent
00ba2faffe
commit
eb53c7164e
17 files changed
+2985
-503
No files matched your search
@@ -60,16 +60,5 @@ pub fn toggle_entry(entry: &ContentEntry) -> Result<(), std::io::Error> {
|
||||
}
|
||||
|
||||
pub(crate) fn toggle_entry_path(entry: &ContentEntry) -> Result<Option<PathBuf>, std::io::Error> {
|
||||
let Some(file_name) = entry.path.file_name().and_then(|name| name.to_str()) else {
|
||||
return Ok(None);
|
||||
};
|
||||
let new_name = if entry.enabled {
|
||||
format!("{file_name}.disabled")
|
||||
} else {
|
||||
file_name.trim_end_matches(".disabled").to_owned()
|
||||
};
|
||||
let mut new_path = entry.path.clone();
|
||||
new_path.set_file_name(new_name);
|
||||
std::fs::rename(&entry.path, &new_path)?;
|
||||
Ok(Some(new_path))
|
||||
super::local::toggle(entry)
|
||||
}
|
||||
Reference in new issue
Block a user