installer: Create target directory when mounting something

This commit is contained in:
Michael Tremer
2014-07-27 15:16:33 +02:00
parent 48d6a112cf
commit 85f2892b2a

View File

@@ -81,6 +81,10 @@ static int strstartswith(const char* a, const char* b) {
}
int hw_mount(const char* source, const char* target, const char* fs, int flags) {
// Create target if it does not exist
if (access(target, X_OK) != 0)
mkdir(target, S_IRWXU|S_IRWXG|S_IRWXO);
return mount(source, target, fs, flags, NULL);
}