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

Support Windows and MacOS platforms #7

Conversation

PROger4ever
Copy link
Contributor

@PROger4ever PROger4ever commented Jul 31, 2020

Each platform has different line breaking characters, so it stucks on

if !e.scanout.Scan() {
  fms[i].Err = fmt.Errorf("nothing on stdout")
  continue
}

waiting for readyToken from the scanner.
I issued this problem on Windows.

@barasher barasher merged commit eaa6f0b into barasher:master Aug 11, 2020
@barasher
Copy link
Owner

Thanks a lot @PROger4ever !

@PROger4ever
Copy link
Contributor Author

@barasher, Could you make a new version tag with these changes, please?

@barasher barasher added this to the v1.1.2 milestone Aug 16, 2020
@barasher
Copy link
Owner

Here it is : v1.1.2

@barasher
Copy link
Owner

I had some problem while creating the release, here it is : v1.1.3

@PROger4ever PROger4ever deleted the support_windows_and_macos_platforms branch September 16, 2020 02:21
@zackyjc
Copy link

zackyjc commented Oct 3, 2020

The problem has been reproduced in MacOS Catalina 10.15.7.

Exiftool version:

MacOS Package: ExifTool-12.07.dmg (3.0 MB)

	if !e.scanMergedOut.Scan() {
		fms[i].Err = fmt.Errorf("nothing on stdMergedOut")
		continue
	}

I use the sample code:
`
et, err := exiftool.NewExiftool()
if err != nil {
fmt.Printf("Error when intializing: %v\n", err)
return
}
defer et.Close()

fileInfos := et.ExtractMetadata(imagefile, imagefile)

for _, fileInfo := range fileInfos {
	if fileInfo.Err != nil {
		fmt.Printf("Error concerning %v: %v\n", fileInfo.File, fileInfo.Err)
		continue
	}

	for k, v := range fileInfo.Fields {
		fmt.Printf("[%v] %v\n", k, v)
	}
}`

@PROger4ever
Copy link
Contributor Author

@zackyjc, Could you try to set different line-breakers in the source code of go-exiftool: \n, \r, \r\n and run your code?

@zackyjc
Copy link

zackyjc commented Oct 3, 2020

Using '\n' instead of '\r', it works. try \r, \r\n, don‘t work.

package exiftool

var readyToken = []byte("{ready}\n")

@PROger4ever
Copy link
Contributor Author

@barasher,Could you change file platforms_darwin.go or fix the issue another way, please?

@barasher
Copy link
Owner

barasher commented Oct 3, 2020

Fixed in v1.3.1

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.

3 participants