diff --git a/screenless/bureau/photography/photography.py b/screenless/bureau/photography/photography.py index 5778d80..f16fc6d 100644 --- a/screenless/bureau/photography/photography.py +++ b/screenless/bureau/photography/photography.py @@ -79,8 +79,9 @@ class Photography(Bureau): # copy last image to the tmpfile filelist = os.listdir("/tmp/webcam") + for i, f in enumerate(filelist): + filelist[i] = os.path.join("/tmp/webcam", f) newest = max(filelist, key=lambda x: os.stat(x).st_mtime) - newest = os.path.join("/tmp/webcam", newest) shutil.copyfile(newest, tmpimg.name) self._doc_light_off()