This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make win32_link and win32_rename raise ENOSPC and EDQUOT when appropriate
authorChristian Millour <cm.perl@abtela.com>
Mon, 16 Sep 2013 23:52:26 +0000 (01:52 +0200)
committerTony Cook <tony@develop-help.com>
Tue, 17 Sep 2013 05:33:03 +0000 (15:33 +1000)
win32/win32.c

index 9f996d6..5322881 100644 (file)
@@ -3138,6 +3138,12 @@ win32_link(const char *oldname, const char *newname)
     case ERROR_NOT_SAME_DEVICE:
       errno = EXDEV;
       break;
+    case ERROR_DISK_FULL:
+      errno = ENOSPC;
+      break;
+    case ERROR_NOT_ENOUGH_QUOTA:
+      errno = EDQUOT;
+      break;
     default:
       /* ERROR_INVALID_FUNCTION - eg. on a FAT volume */
       errno = EINVAL;
@@ -3172,6 +3178,12 @@ win32_rename(const char *oname, const char *newname)
         case ERROR_PATH_NOT_FOUND:
             errno = ENOENT;
             break;
+        case ERROR_DISK_FULL:
+            errno = ENOSPC;
+            break;
+        case ERROR_NOT_ENOUGH_QUOTA:
+            errno = EDQUOT;
+            break;
         default:
             errno = EACCES;
             break;