From e021c1d9ebf99aa433ed51a0286c526686efb185 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Mon, 11 Mar 2024 23:35:24 +0200 Subject: [PATCH] Refactor file creation logic --- storage/file_descriptor.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/storage/file_descriptor.cpp b/storage/file_descriptor.cpp index ff1db64..d1f127b 100644 --- a/storage/file_descriptor.cpp +++ b/storage/file_descriptor.cpp @@ -184,12 +184,10 @@ namespace vfs if (Flags & O_CREAT) { int ret; + bool absolute = cwk_path_is_absolute(AbsolutePath); new Node(pcb->CurrentWorkingDirectory, - AbsolutePath, - NodeType::FILE, - cwk_path_is_absolute(AbsolutePath), - fs, - &ret); + AbsolutePath, NodeType::FILE, + absolute, fs, &ret); if (ret == -EEXIST) {