FIX : dir randomly created fix

This commit is contained in:
Lailouezzz 2020-01-05 17:22:46 +01:00
parent fa3108c6c6
commit 88b6bfd1a2
Signed by: Lailouezzz
GPG Key ID: 03FCE8A99EF8482C
1 changed files with 5 additions and 3 deletions

View File

@ -91,9 +91,11 @@ CASIO_LOCAL int casio_sevenfs_open_write(sevenfs_cookie_t *cookie, sevenfs_path_
casio_off_t size, casio_stream_t **stream, int ow)
{
casio_link_t *handle = cookie; int err;
char *dirname = &path->sevenfs_path_data[path->sevenfs_path_dir];
char *filename = &path->sevenfs_path_data[path->sevenfs_path_file];
char *devname = &path->sevenfs_path_data[path->sevenfs_path_dev];
const char *dirname = path->sevenfs_path_dir != 0xFF ?
&path->sevenfs_path_data[path->sevenfs_path_dir] :
NULL;
const char *filename = &path->sevenfs_path_data[path->sevenfs_path_file];
const char *devname = &path->sevenfs_path_data[path->sevenfs_path_dev];
/* Make checks */
chk_required_filename(filename);