Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer error on xattr removal if it fails #633

Merged
merged 2 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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