From 775207db46a35182575f55722613bd17f2f935c8 Mon Sep 17 00:00:00 2001 From: hut Date: Fri, 3 Jul 2009 13:06:27 +0200 Subject: correct free space display for drives with long mount point names --- code/directory.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit 1.4.1-2-gfad0