about summary refs log tree commit diff stats
path: root/code
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-21 02:18:45 +0200
committerhut <hut@lavabit.com>2009-07-21 02:18:45 +0200
commit2ed66adc4e0a1c1e19fffdf4042f741d358115ea (patch)
tree9b5673dab1105a5304b9c5b2c1f86202408ec28f /code
parent42cf435bb9a210e267584156abb0e435cf14a6e3 (diff)
downloadranger-2ed66adc4e0a1c1e19fffdf4042f741d358115ea.tar.gz
modified `df` flags
I shouldn't use df.. look for alternatives
Diffstat (limited to 'code')
-rw-r--r--code/directory.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/code/directory.rb b/code/directory.rb
index 8e8f2269..5ced4fae 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -110,10 +110,10 @@ class Directory
 		if @free_space then return @free_space end
 
 		@free_space = 0
-		out = `df -PB 1 #{~path}`
+		out = `df -Pk #{~path}`
 		out = out[out.index("\n")+1, out.index("\n", out.index("\n"))]
 		if out =~ /^[^\s]+ \s+ \d+ \s+ \d+ \s+  (\d+)  \s+/x
-			@free_space = $1.to_i
+			@free_space = $1.to_i * 1024
 		end
 		@free_space
 	end