| 1246 | } |
| 1247 | |
| 1248 | static bool activation_sync_directory(const cbm_activation_transaction_t *transaction) { |
| 1249 | #ifdef _WIN32 |
| 1250 | /* MoveFileExW(MOVEFILE_WRITE_THROUGH) is the strongest portable |
| 1251 | * directory-entry durability primitive available here. */ |
| 1252 | (void)transaction; |
| 1253 | return true; |
| 1254 | #else |
| 1255 | int result; |
| 1256 | do { |
| 1257 | result = fsync(transaction->directory_fd); |
| 1258 | } while (result != 0 && errno == EINTR); |
| 1259 | return result == 0 || errno == EINVAL || errno == ENOTSUP || errno == EROFS; |
| 1260 | #endif |
| 1261 | } |
| 1262 | |
| 1263 | #ifdef _WIN32 |
| 1264 | /* Renaming is how this transaction both publishes and retires -- and on Windows |
no outgoing calls
no test coverage detected