compiler: check if output file is a folder

pull/1399/head
Henrixounez 2019-07-31 11:46:38 +02:00 committed by Alexander Medvednikov
parent 2e1da4b4bc
commit 7918a790b4
1 changed files with 3 additions and 0 deletions

View File

@ -757,6 +757,9 @@ mut args := ''
// Output executable name // Output executable name
// else { // else {
a << '-o $v.out_name' 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 // The C file we are compiling
//a << '"$TmpPath/$v.out_name_c"' //a << '"$TmpPath/$v.out_name_c"'
a << '".$v.out_name_c"' a << '".$v.out_name_c"'