Skip to content

If the folder already exists, just overwrite it #35

@newadventure079

Description

@newadventure079

If the script errors out or there is some other issue and you re-run the script, you will most likely see Folder exists: 1 at the end of the the subsequent runs.

I know the folder exists already because there was an issue with the previous run, so just remove it and run the code again.

Here is the code I've written to just wipe out the dir if it exists so it will be recreated and things will continue normally and the torrent will be added

create_link_path() in utils.py

    try:
        store_path.mkdir(parents=True)
    except FileExistsError:
        #edits
        shutil.rmtree(store_path)
        store_path.mkdir(parents=True)
        #raise FailedToCreateLinkException("Path already exist")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions