snakeviz
snakeviz copied to clipboard
limit accessible paths
Previously one could browse the whole filesystem on the machine that
snakeviz
server was running on. Now we limit what can be viewed to the
filename that was passed in on command line.
In the future the CLI could be extended to allow browsing a directory of profile files.
Let me know if you think this is a good direction. I'm thinking maybe we can change the cli to accept <file or dir> [<file or dir> ...]
and those automatically get added to allowed paths?
(It's failing on 2.7, but with py2 going EOL at end of year, maybe not worth supporting it?)
this seems to be available with self._list_dirs already (somewhat broken but I just submitted a pull request that should fix it)
Thanks for submitting this! I don't think I'm quite ready to drop Python 2.7 support yet. Could this also be done with os.path operations? I'm also curious about the motivation for this, are you running into a specific situation in which you want to limit the browsable directory?