From: Alan Cox Date: Wed, 21 Feb 2018 20:32:26 +0000 (+0000) Subject: mkdir: Fix error recover path X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=f32ca36dac8774e3a4bb66507fec1ce4613553f2;p=FUZIX.git mkdir: Fix error recover path This tried to unlink random crap not the correct path. Broken when I tidied up the path walking logic --- diff --git a/Kernel/syscall_other.c b/Kernel/syscall_other.c index a52ee9ac..fc5597d9 100644 --- a/Kernel/syscall_other.c +++ b/Kernel/syscall_other.c @@ -144,7 +144,6 @@ arg_t _mkdir(void) { inoptr ino; inoptr parent; - char fname[FILENAME_LEN + 1]; if ((ino = n_open(name, &parent)) != NULL) { udata.u_error = EEXIST; @@ -193,7 +192,7 @@ cleanup: i_unlock_deref(ino); /* In the error case it may be observed but it's consistently empty */ i_lock(parent); - if (!ch_link(parent, fname, "", NULLINODE)) + if (!ch_link(parent, lastname, "", NULLINODE)) kprintf("_mkdir: bad rec\n"); i_unlock_deref(parent); return -1;