From 7918a790b4a1792c67d9ca04fab3425f1454eab9 Mon Sep 17 00:00:00 2001 From: Henrixounez Date: Wed, 31 Jul 2019 11:46:38 +0200 Subject: [PATCH] compiler: check if output file is a folder --- compiler/main.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compiler/main.v b/compiler/main.v index 02a70b8877..4d00651032 100644 --- a/compiler/main.v +++ b/compiler/main.v @@ -757,6 +757,9 @@ mut args := '' // Output executable name // else { a << '-o $v.out_name' + if os.dir_exists(v.out_name) { + panic('\'$v.out_name\' is a directory') + } // The C file we are compiling //a << '"$TmpPath/$v.out_name_c"' a << '".$v.out_name_c"'