Fix ```if``` breaking the path

pull/407/head
me-no-dev 2017-01-31 17:43:22 +02:00
rodzic 84590ec0a4
commit a57b6326e3
1 zmienionych plików z 3 dodań i 5 usunięć

Wyświetl plik

@ -250,11 +250,9 @@ static void file_cleanup(vfs_fat_ctx_t* ctx, int fd)
}
#define vfs_fat_fix_path(ctx, path) \
if (((vfs_fat_ctx_t*)ctx)->fat_drive[0]) { \
char buf_ ## path[strlen(path)+strlen(((vfs_fat_ctx_t*)ctx)->fat_drive)+1]; \
sprintf(buf_ ## path,"%s%s", ((vfs_fat_ctx_t*)ctx)->fat_drive, path); \
path = (const char *)buf_ ## path; \
}
char buf_ ## path[strlen(path)+strlen(((vfs_fat_ctx_t*)ctx)->fat_drive)+1]; \
sprintf(buf_ ## path,"%s%s", ((vfs_fat_ctx_t*)ctx)->fat_drive, path); \
path = (const char *)buf_ ## path;
static int vfs_fat_open(void* ctx, const char * path, int flags, int mode)
{