mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 10:51:15 -03:00
Merge pull request #11681
This commit is contained in:
4
.gitattributes
vendored
4
.gitattributes
vendored
@@ -1,7 +1,5 @@
|
||||
# normalize newlines
|
||||
* text=auto
|
||||
*.fish text
|
||||
*.bat eol=crlf
|
||||
* text=auto eol=lf
|
||||
|
||||
# let git show off diff hunk headers, help git diff -L:
|
||||
# https://git-scm.com/docs/gitattributes
|
||||
|
||||
@@ -389,7 +389,9 @@ fn run(self) {
|
||||
drop(data);
|
||||
let ret =
|
||||
fds.check_readable(timeout.map(Timeout::Duration).unwrap_or(Timeout::Forever));
|
||||
if ret < 0 && !matches!(errno().0, libc::EINTR | libc::EBADF) {
|
||||
// Cygwin reports ret < 0 && errno == 0 as success.
|
||||
let err = errno().0;
|
||||
if ret < 0 && !matches!(err, libc::EINTR | libc::EBADF) && !(cfg!(cygwin) && err == 0) {
|
||||
// Surprising error
|
||||
perror("select");
|
||||
}
|
||||
|
||||
@@ -667,7 +667,7 @@ fn create_dir_all_with_mode<P: AsRef<std::path::Path>>(path: P, mode: u32) -> st
|
||||
/// Return whether the given path is on a remote filesystem.
|
||||
pub fn path_remoteness(path: &wstr) -> DirRemoteness {
|
||||
let narrow = wcs2zstring(path);
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(any(target_os = "linux", cygwin))]
|
||||
{
|
||||
let mut buf = MaybeUninit::uninit();
|
||||
if unsafe { libc::statfs(narrow.as_ptr(), buf.as_mut_ptr()) } < 0 {
|
||||
@@ -701,7 +701,7 @@ pub fn path_remoteness(path: &wstr) -> DirRemoteness {
|
||||
}
|
||||
}
|
||||
}
|
||||
#[cfg(not(target_os = "linux"))]
|
||||
#[cfg(not(any(target_os = "linux", cygwin)))]
|
||||
{
|
||||
fn remoteness_via_statfs<StatFS, Flags>(
|
||||
statfn: unsafe extern "C" fn(*const i8, *mut StatFS) -> libc::c_int,
|
||||
|
||||
Reference in New Issue
Block a user