| 1189 | } |
| 1190 | |
| 1191 | static bool activation_sync_directory(const cbm_activation_transaction_t *transaction) { |
| 1192 | #ifdef _WIN32 |
| 1193 | /* MoveFileExW(MOVEFILE_WRITE_THROUGH) is the strongest portable |
| 1194 | * directory-entry durability primitive available here. */ |
| 1195 | (void)transaction; |
| 1196 | return true; |
| 1197 | #else |
| 1198 | int result; |
| 1199 | do { |
| 1200 | result = fsync(transaction->directory_fd); |
| 1201 | } while (result != 0 && errno == EINTR); |
| 1202 | return result == 0 || errno == EINVAL || errno == ENOTSUP || errno == EROFS; |
| 1203 | #endif |
| 1204 | } |
| 1205 | |
| 1206 | #ifdef _WIN32 |
| 1207 | /* Renaming is how this transaction both publishes and retires -- and on Windows |
no outgoing calls
no test coverage detected