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

Little bug corrected for windows #227

Open
tofgau opened this issue Apr 13, 2021 · 4 comments
Open

Little bug corrected for windows #227

tofgau opened this issue Apr 13, 2021 · 4 comments

Comments

@tofgau
Copy link

tofgau commented Apr 13, 2021

Hello,

On windows, a non closed file canot be moved.
I had to replace the defer file.Close() by two separate close in order to get this working on windows.

I notify you here but I am not at ease with github.

//defer file.Close()   <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
size, err := io.Copy(file, data)
if err != nil {
	os.Remove(tmpname)
	file.Close(); //gaudc  <<<<<<<<<<<<<<<<<<<<<<<<<<<
	return "", err
}
file.Close();//gaudc<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
file.Sync()

newname := paths.Join(m.Path, "new", fmt.Sprintf("%v,S=%v", basename, size))
err = os.Rename(tmpname, newname)
@pedroalbanese
Copy link

Greetings @tofgau

How to compile it for Windows? syscall.sigusr1 is not compatible..

Thanks!

@cip8
Copy link

cip8 commented Sep 7, 2021

I'm running it on Windows / WSL2 with no problems whatsoever.
If you're experiencing strange issues with it, I recommend running it inside WSL2: is super easy & solves all these problems.

@pedroalbanese
Copy link

Sorry, I'm on Windows7.. =/

@sathishvenkataraman
Copy link

I am new to this and want to run it in windows 11. What are the dependencies needed apart from go? any quick instructions would help, please..

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

No branches or pull requests

4 participants