Re: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-07-03 Thread Jim Ancona
On Wed, Jul 3, 2019 at 1:09 PM Liam wrote: > [Sorry to keep re-posting this; I'm keeping it visible for infrequent > readers] > I'm a frequent reader and I've now seen it four times. IMHO, that's enough. Jim > > Microsoft recommends changing syscall.Open() for GOOS=windows to fix this. > Pls

Re: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-07-03 Thread Liam
[Sorry to keep re-posting this; I'm keeping it visible for infrequent readers] Microsoft recommends changing syscall.Open() for GOOS=windows to fix this. Pls reply if you know of existing apps that rely on it. This code fails with a "sharing violation" on Windows. That behavior is undocumented

Re: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-30 Thread Liam
Microsoft has suggested that Go change syscall.Open() to fix this. Please pipe up if that might break your app! Details quoted... On Tuesday, June 25, 2019 at 8:25:24 AM UTC-7, Liam wrote: > > Microsoft recommends changing this, so we need to know whether existing > apps rely on it: > > On Wind

Fwd: [go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-25 Thread Liam Breck
Microsoft recommends changing this, so we need to know whether existing apps rely on it: On Windows (but not elsewhere) this fails with a "sharing violation": path := "rename-after-open" fd, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600) if err != nil { ... } err = os.Rename(path_a, path_b

[go-nuts] Does your Windows app rely on os.Rename() or .Remove() ?

2019-06-21 Thread Liam
On Windows (but not elsewhere) this fails with a "sharing violation": path := "rename-after-open" fd, err := os.OpenFile(path, os.O_RDWR|os.O_CREATE, 0600) if err != nil { ... } err = os.Rename(path_a, path_b)// or os.Remove(path) if err != nil { ... } // sharing v