imap-download: fix munpack pathing
This commit is contained in:
parent
d65701051f
commit
d7c9b06b6e
1 changed files with 4 additions and 2 deletions
|
@ -95,10 +95,12 @@ do_attachments() {
|
|||
# Move the email to a temporary directory for processing
|
||||
mv "${filename}" "${temp_dir}";
|
||||
|
||||
filepath_temp="${temp_dir}/$(basename "${filename}")"
|
||||
|
||||
# Unpack the attachments
|
||||
munpack -C "${temp_dir}" "${filename}";
|
||||
munpack -C "${temp_dir}" "${filepath_temp}";
|
||||
# Delete the original email file and any description files
|
||||
rm "${temp_dir}/$(basename "${filename}")";
|
||||
rm "${filepath_temp}";
|
||||
find "${temp_dir}" -iname '*.desc' -delete;
|
||||
|
||||
# Move the attachment files to the output directory
|
||||
|
|
Loading…
Reference in a new issue