diff --git a/wrudf/wrudf-cmnd.c b/wrudf/wrudf-cmnd.c index 6abcb18..67a7d60 100644 --- a/wrudf/wrudf-cmnd.c +++ b/wrudf/wrudf-cmnd.c @@ -56,7 +56,7 @@ copyFile(Directory *dir, char* inName, char*newName, struct stat *fileStat) uint8_t p[2048]; fd = open(inName, O_RDONLY); - if( fd == 0 ) { + if( fd < 0 ) { printf("'%s' does not exist\n", inName); return CMND_FAILED; }