Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

short read in readEvents on Windows 2008 server #122

Open
max201920 opened this issue Aug 17, 2019 · 1 comment
Open

short read in readEvents on Windows 2008 server #122

max201920 opened this issue Aug 17, 2019 · 1 comment

Comments

@max201920
Copy link

While reading file from a network drive we are getting below error.

short read in readEvents on
what changes needs to be done on networkDrive permission to get rid of this issue?
it is working fine with windows inbuild drive (i.e. C: / D: )

My Code is as follows.

package main

import (
	"fmt"
	"log"
	"os"
	"time"

	"github.com/howeyc/fsnotify"
)

func main() {
	fmt.Println("hello world")
	watcher, err := fsnotify.NewWatcher()
	if err != nil {
		log.Fatal(err)
	}

	go func() {
		for {
			select {
			case ev := <-watcher.Event:
				log.Println("Custom:", ev)
				log.Println("event:", ev)
			case err := <-watcher.Error:
				log.Println("error:", err)
			}
		}
	}()

	err = watcher.Watch(os.Args[1])
	if err != nil {
		log.Fatal(err)

	}

	time.Sleep(2 * time.Hour)
}
@nathany
Copy link
Contributor

nathany commented Oct 5, 2019

This issue still exists in the latest version of fsnotify (see fork): fsnotify/fsnotify#72

AZ-X added a commit to AZ-X/pique that referenced this issue Dec 6, 2020
Get ready to adjust routines without restart the program
Servers won't be refreshed...

howeyc/fsnotify#122
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants