Skip to content

Commit

Permalink
Fix wrong code references in the linux implementation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturKovacs committed Jul 13, 2019
1 parent 88261d5 commit 037fed8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "trash"
version = "0.1.1"
authors = ["Artur Kovacs <kovacs.artur.barnabas@gmail.com>"]
license-file = "LICENSE.TXT"
license = "MIT"
readme = "Readme.md"
description = "A Rust library for moving files to the Recycle Bin"
keywords = ["remove", "trash", "rubbish", "recycle", "bin"]
Expand Down
6 changes: 3 additions & 3 deletions src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pub fn is_implemented() -> bool {
true
}

/// This is based on the electron library's implementation.
/// See: https://github.com/electron/electron/blob/34c4c8d5088fa183f56baea28809de6f2a427e02/shell/common/platform_util_linux.cc#L96
pub fn remove_all<I, T>(paths: I) -> Result<(), Error>
where
I: IntoIterator<Item = T>,
Expand Down Expand Up @@ -69,8 +71,6 @@ where
Ok(())
}

/// This is based on the electron library's implementation.
/// See: https://github.com/electron/electron/blob/34c4c8d5088fa183f56baea28809de6f2a427e02/shell/common/platform_util_linux.cc#L96
pub fn remove<T: AsRef<Path>>(path: T) -> Result<(), Error> {
remove_all(&[path])
}
Expand All @@ -94,7 +94,7 @@ fn env_has_var(name: &str) -> bool {
env::var_os(name).is_some()
}

/// See: https://github.com/adobe/chromium/blob/cfe5bf0b51b1f6b9fe239c2a3c2f2364da9967d7/base/nix/xdg_util.cc#L34
/// See: https://chromium.googlesource.com/chromium/src/+/dd407d416fa941c04e33d81f2b1d8cab8196b633/base/nix/xdg_util.cc#57
fn get_desktop_environment() -> DesktopEnvironment {
static KDE_SESSION_ENV_VAR: &str = "KDE_SESSION_VERSION";
// XDG_CURRENT_DESKTOP is the newest standard circa 2012.
Expand Down

0 comments on commit 037fed8

Please sign in to comment.