Linux
This commit is contained in:
parent
f13ea62842
commit
5b6b3f553e
1 changed files with 5 additions and 5 deletions
|
@ -468,11 +468,11 @@ impl Fs for RealFs {
|
||||||
|
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||||
async fn trash_file(&self, path: &Path, _options: RemoveOptions) -> Result<()> {
|
async fn trash_file(&self, path: &Path, _options: RemoveOptions) -> Result<()> {
|
||||||
if let Ok(Some(metadata)) = self.metadata(path).await {
|
if let Ok(Some(metadata)) = self.metadata(path).await
|
||||||
if metadata.is_symlink {
|
&& metadata.is_symlink
|
||||||
// TODO: trash_file does not support trashing symlinks yet - https://github.com/bilelmoussaoui/ashpd/issues/255
|
{
|
||||||
return self.remove_file(path, RemoveOptions::default()).await;
|
// TODO: trash_file does not support trashing symlinks yet - https://github.com/bilelmoussaoui/ashpd/issues/255
|
||||||
}
|
return self.remove_file(path, RemoveOptions::default()).await;
|
||||||
}
|
}
|
||||||
let file = smol::fs::File::open(path).await?;
|
let file = smol::fs::File::open(path).await?;
|
||||||
match trash::trash_file(&file.as_fd()).await {
|
match trash::trash_file(&file.as_fd()).await {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue