andrewkroh / gvm

Go Version Manager (written in Go for cross-platform usability)
Apache License 2.0
186 stars 24 forks source link

utils: fixed rename with copy #22

Closed siennathesane closed 3 years ago

siennathesane commented 4 years ago

in windows, you cannot os.Rename() across multiple drives, you get a system error. this fixes that, allowing windows users to go ahead and use gvm outside of their C drive. while I implemented the fix, the reference implementation can be found on stackoverflow, link in the commit message.

there were no tests, but the functionality did what it's intended to do, so I made sure there were at least windows and linux support.

https://stackoverflow.com/a/56314145/4949938

Signed-off-by: Mike Lloyd mike@reboot3times.org

andrewkroh commented 3 years ago

Fixed by #31 .