util.datamanager: Store data stores with no host in '_global' folder
authorMatthew Wild <mwild1@gmail.com>
Sun, 6 Dec 2009 00:35:06 +0000 (00:35 +0000)
committerMatthew Wild <mwild1@gmail.com>
Sun, 6 Dec 2009 00:35:06 +0000 (00:35 +0000)
util/datamanager.lua

index bfd69ebfcb02dbf3a5bb4eebe8b63950542b3d58..30cd082bdf31eb5232542c19034caf44eb37f97f 100644 (file)
@@ -88,7 +88,7 @@ end
 
 function getpath(username, host, datastore, ext, create)
        ext = ext or "dat";
-       host = host and encode(host);
+       host = (host and encode(host)) or "_global";
        username = username and encode(username);
        if username then
                if create then mkdir(mkdir(mkdir(data_path).."/"..host).."/"..datastore); end