From 53802553c92038a2638eba3cae71fcddd257e8e7 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 20 Feb 2003 03:01:38 +0000
Subject: [PATCH] Gets number of kilobytes free instead of bytes free with
 getfreediskspace().

---
 src/sbbs3/tmp_xfer.cpp | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/sbbs3/tmp_xfer.cpp b/src/sbbs3/tmp_xfer.cpp
index b7aa680bca..a204ec3e3f 100644
--- a/src/sbbs3/tmp_xfer.cpp
+++ b/src/sbbs3/tmp_xfer.cpp
@@ -105,10 +105,10 @@ void sbbs_t::temp_xfer()
 		switch(ch) {
 			case 'A':   /* add to temp file */
 				/* free disk space */
-				space=getfreediskspace(cfg.temp_dir,0);
-				if(space<(ulong)cfg.min_dspace*1024L) {
+				space=getfreediskspace(cfg.temp_dir,1024);
+				if(space<(ulong)cfg.min_dspace) {
 					bputs(text[LowDiskSpace]);
-					sprintf(str,"Diskspace is low: %s (%lu bytes)"
+					sprintf(str,"Diskspace is low: %s (%lu kilobytes)"
 						,cfg.temp_dir,space);
 					errorlog(str);
 					if(!dir_op(dirnum))
@@ -289,10 +289,10 @@ void sbbs_t::extract(uint dirnum)
 		intmp=1;
 
 	/* get free disk space */
-	space=getfreediskspace(cfg.temp_dir,0);
-	if(space<(ulong)cfg.min_dspace*1024L) {
+	space=getfreediskspace(cfg.temp_dir,1024);
+	if(space<(ulong)cfg.min_dspace) {
 		bputs(text[LowDiskSpace]);
-		sprintf(str,"Diskspace is low: %s (%lu bytes)",cfg.temp_dir,space);
+		sprintf(str,"Diskspace is low: %s (%lu kilobytes)",cfg.temp_dir,space);
 		errorlog(str);
 		if(!dir_op(dirnum))
 			return; }
-- 
GitLab