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

fix sync error with go1.12 on darwin #147

Merged
merged 1 commit into from
Feb 27, 2019
Merged

fix sync error with go1.12 on darwin #147

merged 1 commit into from
Feb 27, 2019

Conversation

Stebalien
Copy link
Member

In go1.12, go switched how file.Sync() works on macos. Unfortunately, this also changed the "not supported" error to ENOTTY (called ENOTTY for legacy reasons) on macos.

fixes ipfs/kubo#6028

In go1.12, go switched how `file.Sync()` works on macos. Unfortunately, this
also changed the "not supported" error to ENOTTY (called ENOTTY for legacy
reasons) on macos.

fixes ipfs/kubo#6028
@Stebalien Stebalien requested a review from keks as a code owner February 27, 2019 10:33
@ghost ghost assigned Stebalien Feb 27, 2019
@ghost ghost added the status/in-progress In progress label Feb 27, 2019
@@ -8,7 +8,7 @@ import (

func isErrnoNotSupported(err error) bool {
switch err {
case syscall.EINVAL, syscall.ENOTSUP:
case syscall.EINVAL, syscall.ENOTSUP, syscall.ENOTTY:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's called ENOTTY for historical reasons. It means "this ioctl is invalid for this file descriptor".

@Stebalien Stebalien merged commit 2eb1233 into master Feb 27, 2019
@ghost ghost removed the status/in-progress In progress label Feb 27, 2019
@Stebalien Stebalien deleted the fix/go-ipfs-6028 branch February 27, 2019 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inappropriate ioctl for device
2 participants