/*
NNCP -- Node to Node copy, utilities for store-and-forward data exchange
-Copyright (C) 2016-2021 Sergey Matveev <stargrave@stargrave.org>
+Copyright (C) 2016-2022 Sergey Matveev <stargrave@stargrave.org>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
ctx.LogE("lockdir-flock", LEs{{"Path", lockPath}}, err, func(les LEs) string {
return "Locking directory: locking " + lockPath
})
- dirLock.Close() // #nosec G104
+ dirLock.Close()
return nil, err
}
return dirLock, nil
func (ctx *Ctx) UnlockDir(fd *os.File) {
if fd != nil {
- unix.Flock(int(fd.Fd()), unix.LOCK_UN) // #nosec G104
- fd.Close() // #nosec G104
+ unix.Flock(int(fd.Fd()), unix.LOCK_UN)
+ fd.Close()
}
}