aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-28 18:22:25 +0000
committerJason Woodward2005-01-28 18:22:25 +0000
commit57c060424a76357ea83e10ce391740967ae7f59f (patch)
tree14265c85c5fbdce463cf330c913bc5e7d6176859 /src
parentf058bc2949c945af1796cd3b7842196a320c654a (diff)
downloadslapt-get-57c060424a76357ea83e10ce391740967ae7f59f.tar.gz
made sure that disk_space returns true if the space needed is < 0
Diffstat (limited to 'src')
-rw-r--r--src/transaction.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/transaction.c b/src/transaction.c
index b41a88c..1ae4aaa 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -716,6 +716,8 @@ static int disk_space(const rc_config *global_config,int space_needed ){
space_needed *= 1024;
+ if( space_needed < 0 ) return 0;
+
if( statvfs(global_config->working_dir,&statvfs_buf) != 0 ){
if( errno ) perror("statvfs");
return 1;