AP_Logger: handle EEXIST for log dir create

This commit is contained in:
Andrew Tridgell 2019-02-28 11:21:14 +11:00
parent ec0e6137e3
commit 5b762711fd

View File

@ -90,7 +90,7 @@ void AP_Logger_File::Init()
if (ret == -1) {
ret = mkdir(_log_directory, 0777);
}
if (ret == -1) {
if (ret == -1 && errno != EEXIST) {
printf("Failed to create log directory %s : %s\n", _log_directory, strerror(errno));
}