Skip to content

Commit

Permalink
fix: windows
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Oct 7, 2024
1 parent 6b7ede3 commit c90f6ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
2 changes: 0 additions & 2 deletions src/ui/activities/filetransfer/actions/chmod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use remotefs::fs::UnixPex;
use super::{FileTransferActivity, LogLevel};

impl FileTransferActivity {
#[cfg(unix)]
pub fn action_local_chmod(&mut self, mode: UnixPex) {
let files = self.get_local_selected_entries().get_files();

Expand Down Expand Up @@ -51,7 +50,6 @@ impl FileTransferActivity {
}
}

#[cfg(unix)]
pub fn action_find_local_chmod(&mut self, mode: UnixPex) {
let files = self.get_found_selected_entries().get_files();

Expand Down
6 changes: 0 additions & 6 deletions src/ui/activities/filetransfer/actions/symlink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use super::{FileTransferActivity, LogLevel, SelectedFile};

impl FileTransferActivity {
/// Create symlink on localhost
#[cfg(unix)]
pub(crate) fn action_local_symlink(&mut self, name: String) {
if let SelectedFile::One(entry) = self.get_local_selected_entries() {
match self
Expand All @@ -33,11 +32,6 @@ impl FileTransferActivity {
}
}

#[cfg(windows)]
pub(crate) fn action_local_symlink(&mut self, _name: String) {
self.mount_error("Symlinks are not supported on Windows hosts");
}

/// Copy file on remote
pub(crate) fn action_remote_symlink(&mut self, name: String) {
if let SelectedFile::One(entry) = self.get_remote_selected_entries() {
Expand Down
6 changes: 2 additions & 4 deletions src/ui/activities/filetransfer/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,12 @@ impl FileTransferActivity {
self.umount_chmod();
self.mount_blocking_wait("Applying new file mode…");
match self.browser.tab() {
#[cfg(unix)]
FileExplorerTab::HostBridge | FileExplorerTab::FindHostBridge
if self.host_bridge.is_localhost() && cfg!(windows) => {}
FileExplorerTab::HostBridge => self.action_local_chmod(mode),
#[cfg(unix)]
FileExplorerTab::FindHostBridge => self.action_find_local_chmod(mode),
FileExplorerTab::Remote => self.action_remote_chmod(mode),
FileExplorerTab::FindRemote => self.action_find_remote_chmod(mode),
#[cfg(windows)]
FileExplorerTab::HostBridge | FileExplorerTab::FindHostBridge => {}
}
self.umount_wait();
self.update_browser_file_list();
Expand Down

0 comments on commit c90f6ef

Please sign in to comment.