Mercurial > hg > fxanalyse
comparison FXAnalyse.c @ 186:89e092681ba7
Fix data file creation permissions
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Mon, 24 Feb 2014 13:17:08 +0100 |
parents | 12df3a2b18de |
children | a5c70eae1e0b |
comparison
equal
deleted
inserted
replaced
185:bc980095a24d | 186:89e092681ba7 |
---|---|
306 char filename[FILENAME_MAX]; | 306 char filename[FILENAME_MAX]; |
307 | 307 |
308 // construct filename in the form folder\\id-name.txt | 308 // construct filename in the form folder\\id-name.txt |
309 snprintf(filename, sizeof(filename), "%s\\%s-%s.txt", folder, id, name); | 309 snprintf(filename, sizeof(filename), "%s\\%s-%s.txt", folder, id, name); |
310 | 310 |
311 fd = open(filename, O_CREAT|O_WRONLY|O_APPEND); | 311 fd = open(filename, O_CREAT|O_WRONLY|O_APPEND, 00744); |
312 if (fd < 0) { | 312 if (fd < 0) { |
313 logmessage(ERROR, "open data file %s: %s", filename, strerror(errno)); | 313 logmessage(ERROR, "open data file %s: %s", filename, strerror(errno)); |
314 return; | 314 return; |
315 } | 315 } |
316 | 316 |