Base URI for a config store should be root of the zip file, so change path part of URI to be null
336158
private URI getBaseURI(URI configKey) throws URISyntaxException {
    return new URI(configKey.getScheme(), configKey.getAuthority(), null, configKey.getQuery(), configKey.getFragment());
  }
1030083
def _format_base_path(self, api_name):
        """"""
        name = self.app_name
        if self.app_name != api_name:
            name = '{0}-{1}'.format(self.app_name, api_name)
        return name
47934
function resolve(path, config) {
    var original = path;

    if (/^([0-9a-z_$]+(\.[0-9a-z_$]+)*)$/gi.test(path))
        path = path.replace(/\./gi, '/') + '.js';

    var libs = config.getLibs();
    var appRoot = config.getBasePath();
    var appCodeDir = config.getAppDir();

    for(var prefix in libs) if (libs.hasOwnProperty(prefix)) {
        if (path.substr(0, prefix.length) == prefix) {
            path = libs[prefix] + path.substring(prefix.length);
            break;
        }
    }

    path = path.replace(/^~\//gi, appRoot);
    path = path.replace(/^\.\//gi, appCodeDir);

    if (!path.match(/^\//i) && !path.match(/^\w:\\/))
        path = appCodeDir + path;

    path = path.replace(/\/\//gi, '/');

    return path;
}
1135391
function init (root, storage) {
  // calling path
  const calling = path.dirname(getCallingScript())

  // root path
  root = !root || root === '.' || root === './'
    ? root = calling
    : path.isAbsolute(root)
      ? root
      : path.normalize(calling + root)
  sketchpad.root = root.replace(/\/*$/, '/')

  // settings path
  const settingsFolder = path.normalize(sketchpad.root + (storage || 'storage') + '/sketchpad/')
  settingsFile = settingsFolder + 'settings.json'

  // check for settings
  if (!fs.existsSync(settingsFolder)) {
    return error('Folder "' +settingsFolder+ '" not found')
  }
  if (!fs.existsSync(settingsFile)) {
    return error('File "settings.json" not found in "' +settingsFolder+ '"')
  }

  // load settings
  sketchpad.load()
  return this
}
744031
function (rootdir, configData, platform) {
        var configFiles = lib.getConfigFilesByTargetAndParent(rootdir, platform),
            type = 'configFile';

        for (var key in configFiles) {
            if (configFiles.hasOwnProperty(key)) {
                var configFile = configFiles[key];

                var keyParts = key.split('|');
                var target = keyParts[0];
                var parent = keyParts[1];
                var items = configData[target] || [];

                configFile.getchildren().forEach(function (element) {
                    items.push({
                        parent: parent,
                        type: type,
                        destination: element.tag,
                        data: element
                    });
                });

                configData[target] = items;
            }
        }
    }
897444
static String normalizeRootUrl(String rootUrl) {
    Preconditions.checkNotNull(rootUrl, "root URL cannot be null.");
    if (!rootUrl.endsWith("/")) {
      rootUrl += "/";
    }
    return rootUrl;
  }
1164373
private String getStoredBundlePath(String rootDir, String bundleName) {
		if (bundleName.indexOf('/') != -1) {
			bundleName = bundleName.replace('/', File.separatorChar);
		}

		if (!bundleName.startsWith(File.separator)) {
			rootDir += File.separator;
		}

		return rootDir + PathNormalizer.escapeToPhysicalPath(bundleName);
	}
1184739
function normalizePath (path, basePath) {
  var joined = nodepath.join(basePath || '/', path || '');
  var normalized = nodepath.normalize(joined);

  return (normalized !== '/' ? normalized : null);
}
665525
function (rootdir, platform, preferenceMappingData) {
        var configData = lib.parseConfigXml(rootdir, platform, preferenceMappingData),
            platformPath = path.join(rootdir, 'platforms', platform),
            projectName = lib.getConfigXml(rootdir).findtext('name'),
            targetFile;

        for (var targetFileName in configData) {
            if (configData.hasOwnProperty(targetFileName)) {
                var configItems = configData[targetFileName];

                if (platform === 'ios') {
                    if (targetFileName.indexOf("Info.plist") > -1) {
                        targetFile = path.join(platformPath, projectName, projectName + '-Info.plist');
                        lib.updateIosPlist(targetFile, configItems);
                    } else if (targetFileName.indexOf("-Prefix.pch") > -1) {
                        targetFile = path.join(platformPath, projectName, projectName + '-Prefix.pch');
                        lib.updatePrefixPch(targetFile, configItems);
                    }
                }
            }
        }
    }
1029442
def default_load_paths
        paths = ["#{RADIANT_ROOT}/test/mocks/#{environment}"]

        # Add the app's controller directory
        paths.concat(Dir["#{RADIANT_ROOT}/app/controllers/"])

        # Followed by the standard includes.
        paths.concat %w(
          app
          app/metal
          app/models
          app/controllers
          app/helpers
          config
          lib
          vendor
        ).map { |dir| "#{RADIANT_ROOT}/#{dir}" }.select { |dir| File.directory?(dir) }

        paths.concat builtin_directories
        paths.concat library_directories
      end
421245
def get_root_uri(uri):
    """"""
    chunks = urlsplit(uri)
    return urlunsplit((chunks.scheme, chunks.netloc, chunks.path, '', ''))
636544
private static Map<String, String> getConfServerBasePathMap(String app, String version, String env, String key) {

        Map<String, String> parameterMap = new LinkedHashMap<String, String>();

        parameterMap.put(Constants.VERSION, version);
        parameterMap.put(Constants.APP, app);
        parameterMap.put(Constants.ENV, env);
        parameterMap.put(Constants.KEY, key);

        return parameterMap;
    }
925745
public String getPath(String base, String uri) throws ResourceNotFoundException, IOException {

		String fileName = uri;
		if (!fileName.endsWith(".scss")) {
			fileName += ".scss";
		}

		String parentPath = base.replace('\\', '/');
		fileName = fileName.replace('\\', '/');

		return PathNormalizer.concatWebPath(parentPath, fileName);
	}
699186
@Override
    public void setRootUri(String rootUri) {
        this.jsonHttpClient.setRootUri(rootUri);
        this.streamOpsgenieHttpClient.setRootUri(rootUri);
        this.restApiClient.setRootUrl(rootUri);
        this.swaggerApiClient.setBasePath(rootUri);
    }
133919
public static void setDefaultUri(Configuration conf, URI uri) {
    conf.set(FS_DEFAULT_NAME_KEY, uri.toString());
  }
459356
function resolveConfigPath(configPath) {
	// Specify a default
	configPath = configPath || '.pa11yci';
	if (configPath[0] !== '/') {
		configPath = path.join(process.cwd(), configPath);
	}
	if (/\.js(on)?$/.test(configPath)) {
		configPath = configPath.replace(/\.js(on)?$/, '');
	}
	return configPath;
}
71065
function setRoot(mountpath) {

    // mount to root if not mountpath
    let root=mountpath?mountpath:"";
    // add leading slash if needed
    root=root.match(/^\/.*/)?root:`/${root}`;
    // chop off trailing slash
    root=root.match(/^.*\/$/)?root.substring(0,root.length-1):root; 
    // if root is just slash then mountpath is empty (load on root of site)
    root=root.length>1?root:"";
    return root;
}