afl-cov icon indicating copy to clipboard operation
afl-cov copied to clipboard

wrong use of is_dir

Open zjuchenyuan opened this issue 5 years ago • 0 comments

is this a typo to use is_dir to check file exists?

def get_cycle_num(id_num, cargs):

    ### default cycle
    cycle_num = 0

    if not is_dir(cargs.afl_fuzzing_dir + '/plot_data'):
        return cycle_num

the function is_dir is defined to check if the argument is a directory and not a file:

def is_dir(dpath):
    return os.path.exists(dpath) and os.path.isdir(dpath)

zjuchenyuan avatar Jun 23 '19 14:06 zjuchenyuan