Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on missing sym link #2

Open
keul opened this issue Sep 22, 2013 · 0 comments
Open

Issue on missing sym link #2

keul opened this issue Sep 22, 2013 · 0 comments
Labels

Comments

@keul
Copy link
Owner

keul commented Sep 22, 2013

From Jose Lourenco


Hello,

I believe there may be an issue in PyDirDuplicateFinder.

Just in case you haven't noticed it yet:

If there are links on filesystem to files paths that no longer exist, e.g. target files have been
deleted, an exception is raised when performing "stats = os.stat(entry_path)", main(), line
270.

A simple way to solve it is, for example:

            for entry_path in entries:
                try:
                    stats = os.stat(entry_path)
                except OSError: ### Needed because entry_path may be a link to a no-longer

existent file
continue
except Exception, err: ### DBG - check err Exception type or other cleanup
raise(err)
entry = os.path.basename(entry_path)
files.append({'name': entry, 'path' : entry_path, 'size': stats.st_size})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant