Mercurial > vim
comparison src/fileio.c @ 2523:0dffdd8f8871 vim73
Fixed: on MS-Windows sometimes files with number 4913 or higher are left
behind.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 08 Aug 2010 18:46:06 +0200 |
parents | 88751831fa0a |
children | 5769dc787ec5 |
comparison
equal
deleted
inserted
replaced
2522:d7ecfc8b784c | 2523:0dffdd8f8871 |
---|---|
3742 # endif | 3742 # endif |
3743 /* Close the file before removing it, on MS-Windows we | 3743 /* Close the file before removing it, on MS-Windows we |
3744 * can't delete an open file. */ | 3744 * can't delete an open file. */ |
3745 close(fd); | 3745 close(fd); |
3746 mch_remove(IObuff); | 3746 mch_remove(IObuff); |
3747 # ifdef MSWIN | |
3748 /* MS-Windows may trigger a virus scanner to open the | |
3749 * file, we can't delete it then. Keep trying for half a | |
3750 * second. */ | |
3751 { | |
3752 int try; | |
3753 | |
3754 for (try = 0; try < 10; ++try) | |
3755 { | |
3756 if (mch_lstat((char *)IObuff, &st) < 0) | |
3757 break; | |
3758 ui_delay(50L, TRUE); /* wait 50 msec */ | |
3759 mch_remove(IObuff); | |
3760 } | |
3761 } | |
3762 # endif | |
3747 } | 3763 } |
3748 } | 3764 } |
3749 } | 3765 } |
3750 | 3766 |
3751 # ifdef UNIX | 3767 # ifdef UNIX |