MCPcopy
hub / github.com/InstaPy/InstaPy / differ_paths

Function differ_paths

instapy/file_manager.py:184–195  ·  view source on GitHub ↗

Compare old and new paths

(old, new)

Source from the content-addressed store, hash-verified

182
183
184def differ_paths(old, new):
185 """Compare old and new paths"""
186
187 if old and old.endswith(("\\", "/")):
188 old = old[:-1]
189 old = old.replace("\\", "/")
190
191 if new and new.endswith(("\\", "/")):
192 new = new[:-1]
193 new = new.replace("\\", "/")
194
195 return new != old
196
197
198def validate_path(path):

Callers 1

set_workspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected