2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

do not pull hotlinked images when max_image_size_kb == 0

This commit is contained in:
Régis Hanol 2013-11-13 17:30:48 +01:00
parent a01b423263
commit 7e7d951152
6 changed files with 11 additions and 10 deletions

View file

@ -8,7 +8,7 @@ class MemInfo
system = `uname`.strip
if system == "Darwin"
s = `sysctl -n hw.memsize`.strip
s.to_i / 1024
s.to_i / 1.kilobyte
else
s = `grep MemTotal /proc/meminfo`
/(\d+)/.match(s)[0].try(:to_i)