Avoid touch failing on missing files deleted or moved since the last sync

This commit is contained in:
Andrea Mazzoleni 2026-09-30 15:37:52 +02:00
parent 66ae70481c
commit eb75cef0fe
2 changed files with 15 additions and 2 deletions

View file

@ -877,6 +877,9 @@ void windows_errno(DWORD error)
case ERROR_PATH_NOT_FOUND : /* in GetFileAttributeW() if internal path not found */
errno = ENOENT;
break;
case ERROR_DIRECTORY :
errno = ENOTDIR;
break;
case ERROR_ACCESS_DENIED : /* in CreateDirectoryW() if dir is scheduled for deletion */
case ERROR_CURRENT_DIRECTORY : /* in RemoveDirectoryW() if removing the current directory */
case ERROR_SHARING_VIOLATION : /* in RemoveDirectoryW() if in use */
@ -4688,3 +4691,4 @@ void os_done(void)
}
#endif