Skip to content

Commit cc427f5

Browse files
authored
Retry renameFile operations on windows (#4605)
1 parent f27dcfd commit cc427f5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/src/io.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,9 @@ void copyFile(String from, String to) {
577577

578578
void renameFile(String from, String to) {
579579
log.io('Renaming "$from" to "$to".');
580-
File(from).renameSync(to);
580+
_attempt('Renaming `$from` to `$to`', () {
581+
File(from).renameSync(to);
582+
});
581583
}
582584

583585
bool _isDirectoryNotEmptyException(FileSystemException e) {

0 commit comments

Comments
 (0)