def local_to_real(path):
    path = unixnorm(path)
    if (path == '/.settings.bin'):
        print('APPDATA', get_appdata())
        dir = ((get_appdata() + os.path.sep) + '.fairmotion')
        if (not os.path.exists(dir)):
            print('make dirs', dir)
            os.makedirs(dir)
        path = os.path.join(dir, '.settings.bin')
        print('DIRPATH', dir)
        print('PATH', path)
        if (not os.path.exists(path)):
            templ = (config.server_root + '/default_settings_bin')
            f = open(templ, 'rb')
            buf = f.read()
            f.close()
            f = open(path, 'wb')
            f.write(buf)
            f.close()
        return os.path.abspath(os.path.normpath(path))
    if (not serv_all_local):
        path = ((files_root + os.path.sep) + path)
    return os.path.abspath(os.path.normpath(path))
def local_to_real(path):
    path = unixnorm(path)
    if (path == '/.settings.bin'):
        print('APPDATA', get_appdata())
        dir = ((get_appdata() + os.path.sep) + '.fairmotion')
        if (not os.path.exists(dir)):
            print('make dirs', dir)
            os.makedirs(dir)
        path = os.path.join(dir, '.settings.bin')
        print('DIRPATH', dir)
        print('PATH', path)
        if (not os.path.exists(path)):
            templ = (config.server_root + '/default_settings_bin')
            f = open(templ, 'rb')
            buf = f.read()
            f.close()
            f = open(path, 'wb')
            f.write(buf)
            f.close()
        return os.path.abspath(os.path.normpath(path))
    if (not serv_all_local):
        path = ((files_root + os.path.sep) + path)
    return os.path.abspath(os.path.normpath(path))