cybozu-go / aptutil

Go utilities for Debian APT repositories
MIT License
124 stars 29 forks source link

Automatically create cache directories if permissions suffice #29

Closed jacksgt closed 6 years ago

jacksgt commented 6 years ago

Hi!

For some usage scenarios (such as containers) it may be useful to automatically create the meta and cache directories.

This patch checks whether the path is present, if it is not, it attempts to create the specified path. If that fails, it yields a panic (just like NewStorage does when it receives a relative path)

ymmt2005 commented 6 years ago

Thank you. I will take a look.

ymmt2005 commented 6 years ago

@jacksgt Added a comment. Would you fix it, please?

jacksgt commented 6 years ago

Good catch! Directories need to have the executable bit, of course.

Updated.

ymmt2005 commented 6 years ago

Merged. Thank you!