MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / getPath

Method getPath

src/Site/SiteStorage.py:355–363  ·  view source on GitHub ↗
(self, inner_path)

Source from the content-addressed store, hash-verified

353
354 # Security check and return path of site's file
355 def getPath(self, inner_path):
356 inner_path = inner_path.replace("\\", "/") # Windows separator fix
357 if not inner_path:
358 return self.directory
359
360 if "../" in inner_path:
361 raise Exception("File not allowed: %s" % inner_path)
362
363 return "%s/%s" % (self.directory, inner_path)
364
365 # Get site dir relative path
366 def getInnerPath(self, path):

Callers 15

openDbMethod · 0.95
getDbMethod · 0.95
updateDbFileMethod · 0.95
getDbFilesMethod · 0.95
rebuildDbMethod · 0.95
openMethod · 0.95
readMethod · 0.95
writeMethod · 0.95
deleteMethod · 0.95
deleteDirMethod · 0.95
renameMethod · 0.95
walkMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected