catch missing device on card

closes #3
This commit is contained in:
Jan-Piet Mens
2015-08-15 07:50:17 +02:00
parent 7ec944ea29
commit e6fdc8caf2
+3 -4
View File
@@ -51,12 +51,11 @@ FILE *pathn(char *mode, char *prefix, UT_string *user, UT_string *device, char *
if (device) {
ut_lower(device);
utstring_printf(path, "%s/%s/%s/%s", JSONDIR, prefix, utstring_body(user), utstring_body(device));
} else {
utstring_printf(path, "%s/%s/%s", JSONDIR, prefix, utstring_body(user));
}
//utstring_printf(path, "%s/%s/%-1.1s/%-2.2s",
// JSONDIR, prefix, utstring_body(user), utstring_body(user));
utstring_printf(path, "%s/%s/%s/%s", JSONDIR, prefix, utstring_body(user), utstring_body(device));
ut_clean(path);
if (mkpath(utstring_body(path)) < 0) {