Skip to content

Commit

Permalink
No longer error on xattr removal if it fails (#633)
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed Feb 10, 2024
1 parent 0897487 commit bae3c95
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ that were not yet released.

_Unreleased_

- When `behavior.venv-mark-sync-ignore` is set to `false` and the file system
does not support extended attributes, no longer will a warning be printed. #633

<!-- released start -->

## 0.22.0
Expand Down
5 changes: 3 additions & 2 deletions rye/src/utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ where
}

/// Given the path to a folder this adds or removes a cloud sync flag
/// on the folder.
/// on the folder. Adding flags will return an error if it does not work,
/// removing flags is silently ignored.
///
/// Today this only supports dropbox and apple icloud.
pub fn mark_path_sync_ignore(venv: &Path, mark_ignore: bool) -> Result<(), Error> {
Expand All @@ -64,7 +65,7 @@ pub fn mark_path_sync_ignore(venv: &Path, mark_ignore: bool) -> Result<(), Error
if mark_ignore {
xattr::set(venv, flag, b"1")?;
} else {
xattr::remove(venv, flag)?;
xattr::remove(venv, flag).ok();
}
}
}
Expand Down

0 comments on commit bae3c95

Please sign in to comment.