mirror of
https://github.com/arsenetar/dupeguru.git
synced 2025-03-10 13:44:37 +00:00
[#84 state:hold] Added debug logging to fs.get_files() to eventually figure out the cause of this bug.
This commit is contained in:
parent
7464e0f799
commit
b372974437
10
core/fs.py
10
core/fs.py
@ -160,8 +160,16 @@ def get_file(path, fileclasses=[File]):
|
|||||||
|
|
||||||
def get_files(path, fileclasses=[File]):
|
def get_files(path, fileclasses=[File]):
|
||||||
assert all(issubclass(fileclass, File) for fileclass in fileclasses)
|
assert all(issubclass(fileclass, File) for fileclass in fileclasses)
|
||||||
|
def combine_paths(p1, p2):
|
||||||
try:
|
try:
|
||||||
paths = [path + name for name in io.listdir(path)]
|
return p1 + p2
|
||||||
|
except Exception:
|
||||||
|
# This is temporary debug logging for #84.
|
||||||
|
logging.warning("Failed to combine %r and %r.", p1, p2)
|
||||||
|
raise
|
||||||
|
|
||||||
|
try:
|
||||||
|
paths = [combine_paths(path, name) for name in io.listdir(path)]
|
||||||
result = []
|
result = []
|
||||||
for path in paths:
|
for path in paths:
|
||||||
file = get_file(path, fileclasses=fileclasses)
|
file = get_file(path, fileclasses=fileclasses)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user