| 1116 | } |
| 1117 | |
| 1118 | static bool activation_sync_directory(const cbm_activation_transaction_t *transaction) { |
| 1119 | #ifdef _WIN32 |
| 1120 | /* MoveFileExW(MOVEFILE_WRITE_THROUGH) is the strongest portable |
| 1121 | * directory-entry durability primitive available here. */ |
| 1122 | (void)transaction; |
| 1123 | return true; |
| 1124 | #else |
| 1125 | int result; |
| 1126 | do { |
| 1127 | result = fsync(transaction->directory_fd); |
| 1128 | } while (result != 0 && errno == EINTR); |
| 1129 | return result == 0 || errno == EINVAL || errno == ENOTSUP || errno == EROFS; |
| 1130 | #endif |
| 1131 | } |
| 1132 | |
| 1133 | #ifdef _WIN32 |
| 1134 | /* Renaming is how this transaction both publishes and retires -- and on Windows |
no outgoing calls
no test coverage detected