Author: bklaas
Date: Wed Aug 6 14:26:47 2008
New Revision: 2792
URL: http://svn.slimdevices.com?rev=2792&root=Jive&view=rev
Log:
Bug: 5248
Description: only add Settings->Advanced->Logging if there's an SD card slotted
in and a /mnt/mmc/log directory present
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsMeta.lua
Modified:
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsMeta.lua
URL:
http://svn.slimdevices.com/7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsMeta.lua?rev=2792&root=Jive&r1=2791&r2=2792&view=diff
==============================================================================
---
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsMeta.lua
(original)
+++
7.1/trunk/squeezeplay/src/squeezeplay/share/applets/LogSettings/LogSettingsMeta.lua
Wed Aug 6 14:26:47 2008
@@ -22,6 +22,7 @@
local appletManager = appletManager
local jiveMain = jiveMain
+local lfs = require("lfs")
module(...)
@@ -34,7 +35,11 @@
function registerApplet(meta)
- jiveMain:addItem(meta:menuItem('appletLogSettings', 'advancedSettings',
'DEBUG_LOG', function(applet, ...) applet:logSettings(...) end))
+ -- only make this available if an SD card is slotted in and a
/mnt/mmc/log directory is present
+ local SDCARD_PATH = "/mnt/mmc/log"
+ if lfs.attributes(SDCARD_PATH, "mode") == "directory" then
+ jiveMain:addItem(meta:menuItem('appletLogSettings',
'advancedSettings', 'DEBUG_LOG', function(applet, ...) applet:logSettings(...)
end))
+ end
end
_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins