hicklemr / rtgui

Automatically exported from code.google.com/p/rtgui
0 stars 1 forks source link

two problems when showing free disk space #32

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
On my system rtGui gets "~/torrent" in $globalstats['diskspace'] and
free_disk_space() doesn't work on that - I think it does not resolve '~'.

Also, ~ of the rtorrent process could be different than ~ of the [mod_]php
process.

Further, free_disk_space() could be blocked by open_basedir restrictions in
php.

I suggest, if possible, to get absolute paths from rtorrent.
I also suggest to check for errors from the free_disk_space() functions and
in case of errors hide all the "Disk free: xxx |" piece.

This is the output on my system with $globalstats['diskspace']="~/torrent":

rTorrent 0.8.2/0.12.2 |
Warning: disk_free_space() [function.disk-free-space]: No such file or
directory in /var/www/srv4.lm-net.it/htdocs/rtgui/index.php on line 173
Disk Free: | Page created in 0.606 secs.
rtGui v0.2.3 - by Simon Hall 2007 

Original issue reported on code.google.com by luca.les...@gmail.com on 17 Jun 2008 at 3:10

GoogleCodeExporter commented 8 years ago
See http://code.google.com/p/rtgui/issues/detail?id=3

Will be fixed in next version, using a var set in config.php.

Original comment by lemonbe...@gmail.com on 18 Jun 2008 at 5:39