Skip to content

Commit

Permalink
Fix windows path and header regexes
Browse files Browse the repository at this point in the history
  • Loading branch information
chenghlee committed Jul 22, 2020
1 parent 188b008 commit ed095f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion conda/common/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def win_path_to_unix(path, root_prefix=""):
def _translation(found_path): # NOQA
found = found_path.group(1).replace("\\", "/").replace(":", "").replace("//", "/")
return root_prefix + "/" + found
path_re = '(?<![:/^a-zA-Z])([a-zA-Z]:[\\/\\\\]+(?:[^:*?"<>|]+[\\/\\\\]+)*[^:*?"<>|;\\/\\\\]+?(?![a-zA-Z]:))' # noqa
path_re = '(?<![:/^a-zA-Z])([a-zA-Z]:[/\\\\]+(?:[^:*?"<>|]+[/\\\\]+)*[^:*?"<>|;/\\\\]+?(?![a-zA-Z]:))' # noqa
path = re.sub(path_re, _translation, path).replace(";/", ":/")
return path

Expand Down
2 changes: 1 addition & 1 deletion conda/core/subdir_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

REPODATA_PICKLE_VERSION = 28
MAX_REPODATA_VERSION = 1
REPODATA_HEADER_RE = b'"(_etag|_mod|_cache_control)":[ ]?"(.*?[^\\\\])"[,\\}\\s]' # NOQA
REPODATA_HEADER_RE = b'"(_etag|_mod|_cache_control)":[ ]?"(.*?[^\\\\])"[,}\\s]' # NOQA


class SubdirDataType(type):
Expand Down

0 comments on commit ed095f3

Please sign in to comment.