| 596 | |
| 597 | |
| 598 | void File::SetOpenFileTime(RarTime *ftm,RarTime *ftc,RarTime *fta) |
| 599 | { |
| 600 | #ifdef _WIN_ALL |
| 601 | // Workaround for OpenIndiana NAS time bug. If we cannot create a file |
| 602 | // in write only mode, we need to flush the write buffer before calling |
| 603 | // SetFileTime or file time will not be changed. |
| 604 | if (CreateMode!=FMF_UNDEFINED && (CreateMode & FMF_WRITE)==0) |
| 605 | FlushFileBuffers(hFile); |
| 606 | |
| 607 | bool sm=ftm!=NULL && ftm->IsSet(); |
| 608 | bool sc=ftc!=NULL && ftc->IsSet(); |
| 609 | bool sa=fta!=NULL && fta->IsSet(); |
| 610 | FILETIME fm,fc,fa; |
| 611 | if (sm) |
| 612 | ftm->GetWinFT(&fm); |
| 613 | if (sc) |
| 614 | ftc->GetWinFT(&fc); |
| 615 | if (sa) |
| 616 | fta->GetWinFT(&fa); |
| 617 | SetFileTime(hFile,sc ? &fc:NULL,sa ? &fa:NULL,sm ? &fm:NULL); |
| 618 | #endif |
| 619 | } |
| 620 | |
| 621 | |
| 622 | void File::SetCloseFileTime(RarTime *ftm,RarTime *fta) |
no test coverage detected