MCPcopy
hub / github.com/ChinaGodMan/UserScripts / modify_path

Function modify_path

utils/fix_toc.py:36–41  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

34
35
36def modify_path(path):
37 if path.startswith('./'):
38 return '../' + path[2:]
39 elif path.startswith('../'):
40 return '../../' + path[3:]
41 return path
42
43
44def get_top_path(paths):

Callers 1

fix_toc.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected