MycroftAI / mycroft-skills-manager

Mycroft Skills Manager
Apache License 2.0
14 stars 13 forks source link

fix #62 #63

Closed flozi00 closed 4 years ago

flozi00 commented 4 years ago

fix https://github.com/MycroftAI/mycroft-skills-manager/issues/62#issue-547414079

krisgesling commented 4 years ago

Hey Florian, there's some other interesting methods available in os that might be useful here.

Maybe checkout: https://docs.python.org/3.5/library/os.path.html#os.path.isdir https://docs.python.org/3.5/library/os.html?highlight=makedirs#os.makedirs

flozi00 commented 4 years ago

Hey Kris, ~/ is not working with this functions. Shell command creates directory if not already existing. The validation is built in by linux

forslund commented 4 years ago

You can use the expanduser function (already used in this file) to get the full path

flozi00 commented 4 years ago

better this time ?

forslund commented 4 years ago

Is there a reason you're not using os.path.dirname to get the dirname from the original path?

flozi00 commented 4 years ago

I just didn't thought about