replace global path with relative path