Merge pull request #79 from zcash-hackworks/create_log_file

Add initial conditional to create log file if it does not exist
This commit is contained in:
Marshall Gaucher 2019-10-01 16:02:59 -07:00 committed by GitHub
commit 4b6b77336a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -123,6 +123,9 @@ func main() {
}
for _, filename := range filesThatShouldExist {
if !fileExists(opts.logPath) {
os.OpenFile(opts.logPath, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
}
if (opts.veryInsecure && (filename == opts.tlsCertPath || filename == opts.tlsKeyPath)) {
continue
}