MCPcopy Create free account
hub / github.com/borgbackup/borg / normalize_path

Function normalize_path

src/borg/patterns.py:166–170  ·  view source on GitHub ↗

normalize paths for MacOS (but do nothing on other platforms)

(path)

Source from the content-addressed store, hash-verified

164
165
166def normalize_path(path):
167 """normalize paths for MacOS (but do nothing on other platforms)"""
168 # HFS+ converts paths to a canonical form, so users shouldn't be required to enter an exact match.
169 # Windows and Unix filesystems allow different forms, so users always have to enter an exact match.
170 return unicodedata.normalize("NFD", path) if sys.platform == "darwin" else path
171
172
173class PatternBase:

Callers 3

matchMethod · 0.85
__init__Method · 0.85
matchMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected