Skip to content
Snippets Groups Projects
Commit fea302e6 authored by Tristan Van Berkom's avatar Tristan Van Berkom
Browse files

local.py source plugin: Fixed to support symlinks

This was otherwise throwing an exception when trying
the create the checksum for a symlink.
parent 781fc131
No related branches found
No related tags found
Loading
......@@ -97,6 +97,8 @@ def sha256sum(filename):
# If it's a directory, just return 0 string
if os.path.isdir(filename):
return "0"
elif os.path.islink(filename):
return "1"
h = hashlib.sha256()
with open(filename, "rb") as f:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment