diff --git a/src/xpdev/dirwrap.c b/src/xpdev/dirwrap.c
index 2b478d2ad5a4c77c5c177414c975e0f0b52a32b0..78a86a96b3d5ae1973ebfabe15f0638db6a3f92b 100644
--- a/src/xpdev/dirwrap.c
+++ b/src/xpdev/dirwrap.c
@@ -619,7 +619,7 @@ ulong DLLCALL getfreediskspace(const char* path, ulong unit)
 			NULL))		// receives the free bytes on disk
 			return(0);
 
-		if(unit)
+		if(unit>1)
 			avail.QuadPart=Int64ShrlMod32(avail.QuadPart,bit_num(unit));
 
 #if defined(_ANONYMOUS_STRUCT)
@@ -647,7 +647,7 @@ ulong DLLCALL getfreediskspace(const char* path, ulong unit)
 		))
 		return(0);
 
-	if(unit)
+	if(unit>1)
 		NumberOfFreeClusters/=unit;
 	return(NumberOfFreeClusters*SectorsPerCluster*BytesPerSector);
 
@@ -660,7 +660,7 @@ ulong DLLCALL getfreediskspace(const char* path, ulong unit)
     if (statfs(path, &fs) < 0)
     	return 0;
 
-	if(unit)
+	if(unit>1)
 		fs.f_bavail/=unit;
     return fs.f_bsize * fs.f_bavail;