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

FileNotFoundError when dealing with a symlink #2

Closed
Cyber28 opened this issue Jul 20, 2019 · 1 comment
Closed

FileNotFoundError when dealing with a symlink #2

Cyber28 opened this issue Jul 20, 2019 · 1 comment

Comments

@Cyber28
Copy link

Cyber28 commented Jul 20, 2019

When diskspace encounters a symlink, it fails with FileNotFoundError

Traceback (most recent call last):
  File "/usr/bin/diskspace", line 11, in <module>
    load_entry_point('diskspace==1.0.3.2', 'console_scripts', 'diskspace')()
  File "/usr/lib/python3.7/site-packages/diskspace/diskspace.py", line 51, in main
    shell()
  File "/usr/lib/python3.7/site-packages/diskspace/diskspace.py", line 45, in shell
    whitelist=args.only
  File "/usr/lib/python3.7/site-packages/diskspace/pathRender.py", line 140, in pretty_print
    allFiles = self.all_files
  File "/usr/lib/python3.7/site-packages/diskspace/pathRender.py", line 134, in all_files
    return list(self.getPathFiles().values())
  File "/usr/lib/python3.7/site-packages/diskspace/pathRender.py", line 97, in getPathFiles
    size = os.path.getsize(file)
  File "/usr/lib/python3.7/genericpath.py", line 50, in getsize
    return os.stat(filename).st_size
FileNotFoundError: [Errno 2] No such file or directory: '.steampath'```
@AlexFlipnote
Copy link
Owner

Should be resolved now in c12dd39

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

No branches or pull requests

2 participants