Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions etc/eyefiserver.conf
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ upload_dir=~/eyefi/%Y/%Y%m%d

use_date_from_file=no

# Should we extract EyeFi logs from image tarfile.
# They are of little use usually, so default is 'no'.

#extract_logs=yes

# This parameter executes the specified command on each incoming file passing in
# the full file path as the first argument.
Expand Down
9 changes: 8 additions & 1 deletion src/eyefiserver
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,14 @@ class EyeFiRequestHandler(BaseHTTPRequestHandler):

eyeFiLogger.debug("Extracting TAR file %s", tarpath)
imagefilename = imagetarfile.getnames()[0]
imagetarfile.extractall(path=upload_dir)

extract_logs = self.server.config.getboolean(macaddress,
'extract_logs', False)

if extract_logs:
imagetarfile.extractall(path=upload_dir)
else:
imagetarfile.extract(imagefilename, path=upload_dir)

if use_date_from_file and correct_mtime:
corr_mtime = time.mktime(reference_date.timetuple())
Expand Down