| 1388 | } |
| 1389 | |
| 1390 | static bool activation_sync_directory(const cbm_activation_transaction_t *transaction) { |
| 1391 | #ifdef _WIN32 |
| 1392 | /* MoveFileExW(MOVEFILE_WRITE_THROUGH) is the strongest portable |
| 1393 | * directory-entry durability primitive available here. */ |
| 1394 | (void)transaction; |
| 1395 | return true; |
| 1396 | #else |
| 1397 | int result; |
| 1398 | do { |
| 1399 | result = fsync(transaction->directory_fd); |
| 1400 | } while (result != 0 && errno == EINTR); |
| 1401 | return result == 0 || errno == EINVAL || errno == ENOTSUP || errno == EROFS; |
| 1402 | #endif |
| 1403 | } |
| 1404 | |
| 1405 | #ifdef _WIN32 |
| 1406 | /* Renaming is how this transaction both publishes and retires -- and on Windows |
no outgoing calls
no test coverage detected