Skip to content

Commit

Permalink
Merge pull request #39 from charleslf2/patch-1
Browse files Browse the repository at this point in the history
fix the error "isdir"
  • Loading branch information
gurugaurav authored Jan 10, 2023
2 parents 1c42f43 + f957311 commit 62e39b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bing_image_downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def download(query, limit=100, output_dir='dataset', adult_filter_off=True,
image_dir = Path(output_dir).joinpath(query).absolute()

if force_replace:
if Path.isdir(image_dir):
if Path.is_dir(image_dir):
shutil.rmtree(image_dir)

# check directory and create if necessary
Expand Down

0 comments on commit 62e39b2

Please sign in to comment.