about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-07-03 13:06:27 +0200
committerhut <hut@lavabit.com>2009-07-03 13:06:27 +0200
commit775207db46a35182575f55722613bd17f2f935c8 (patch)
treef417ca98b38b5a90a1c8fafbb925fef6dc9a6a8c
parentb8234aedc8ea2f7ccca333266d3a86cb8aa5f962 (diff)
downloadranger-775207db46a35182575f55722613bd17f2f935c8.tar.gz
correct free space display for drives with long mount point names
-rw-r--r--code/directory.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/code/directory.rb b/code/directory.rb
index a686e87e..01634ca0 100644
--- a/code/directory.rb
+++ b/code/directory.rb
@@ -124,7 +124,7 @@ class Directory
 		if @free_space then return @free_space end
 
 		@free_space = 0
-		out = `df -B 1 #{~path}`
+		out = `df -PB 1 #{~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