Netflix / flamescope

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.
Apache License 2.0
3.02k stars 169 forks source link

fix to allow to run the app on windows #33

Closed koushiksaha89 closed 6 years ago

koushiksaha89 commented 6 years ago

due to valid file path check regular expression, examples were not loading on windows. For windows path, it contains \ which is a part of valid path check in fileutils files.

koushiksaha89 commented 6 years ago

@spiermar Can you please guide on this? this is my first contributions to open-source projects.

takac commented 6 years ago

Actually this might be because the validpath doesn't have\ in the invalidchars. It looks likely that this function needs to be fixed rather than replaced. Unfortunately I can't test this on my current platform. As far as I can tell all the code uses platform agnostic path separating and joining. EDIT: Also need to fix app/util/stack.py:60

Can you try undoing your patch @koushiksaha89 and instead modifying the regular expression used in invalidchars.

invalidchars = re.compile('[^a-zA-Z0-9.,/_%+: -\\\\]') 
spiermar commented 6 years ago

@koushiksaha89 can you try the change suggested by @takac ?

koushiksaha89 commented 6 years ago

@takac @spiermar solution provided by @takac worked. I am able to run the app on my windows system. sending a new pull request as my branch got corrupted.

spiermar commented 6 years ago

Perfect! Thank you @koushiksaha89