MobileBlur

Diff
Login

Differences From Artifact [76dc3c9e63]:

To Artifact [d5f62e0e51]:


11
12
13
14
15
16
17
18

19
20
21
22
23
24
25
11
12
13
14
15
16
17

18
19
20
21
22
23
24
25







-
+







import traceback
import zipfile
import urllib
from shutil import rmtree
from utils import web2py_uuid
from fileutils import w2p_pack, w2p_unpack, w2p_pack_plugin, w2p_unpack_plugin
from fileutils import up, fix_newlines, abspath, recursive_unlink
from fileutils import read_file, write_file
from fileutils import read_file, write_file, parse_version
from restricted import RestrictedError
from settings import global_settings

def apath(path='', r=None):
    """
    Builds a path inside an application folder

340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
340
341
342
343
344
345
346

347
348
349
350
351
352
353
354







-
+







        `True` if upgrade available, `False` if current version if up-to-date,
        -1 on error
    version:
        the most up-to-version available
    """
    try:
        from urllib import urlopen
        version = urlopen(version_URL).read()
        version = parse_version(urlopen(version_URL).read())
    except Exception:
        return -1, myversion

    if version > myversion:
        return True, version
    else:
        return False, version
446
447
448
449
450
451
452
453


446
447
448
449
450
451
452
453
454
455








+
+
            for subfolder in ('models', 'views', 'controllers', 'databases',
                              'modules', 'cron', 'errors', 'sessions',
                              'languages', 'static', 'private', 'uploads'):
                path =  os.path.join(request.folder, subfolder)
                if not os.path.exists(path):
                    os.mkdir(path)
            global_settings.app_folders.add(request.folder)