mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-04-08 14:34:09 +00:00
Merge pull request #778 from zhanluxianshen/fix-fsnotify-logic
Fix fsnotify.Remove logic function.
This commit is contained in:
commit
21ba9932d0
@ -187,11 +187,11 @@ create:
|
||||
if !strings.HasPrefix(deviceNode, "nvidia") {
|
||||
continue
|
||||
}
|
||||
if event.Op&fsnotify.Create == fsnotify.Create {
|
||||
if event.Has(fsnotify.Create) {
|
||||
m.logger.Infof("%s created, restarting.", event.Name)
|
||||
goto create
|
||||
}
|
||||
if event.Op&fsnotify.Create == fsnotify.Remove {
|
||||
if event.Has(fsnotify.Remove) {
|
||||
m.logger.Infof("%s removed. Ignoring", event.Name)
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user