diff --git a/src/import/attachment.rs b/src/import/attachment.rs index 0db7f84..71cf341 100644 --- a/src/import/attachment.rs +++ b/src/import/attachment.rs @@ -51,10 +51,8 @@ impl Actor for ImportAttachmentActor { this.trello_attachment.name ); // - - - download the attachment from trello - let dir_path = this.ctx.temp_fs.base().join(&*this.trello_attachment.id); - let dir = this.ctx.temp_fs.dir(&dir_path); - dir.create()?; // FIXME: (#6) handle error - let file_path = dir_path.join(&*this.trello_attachment.name); + let file_name = f!("{}-{}", this.trello_attachment.id, this.trello_attachment.name); + let file_path = this.ctx.temp_fs.base().join(&file_name); ask!(this.rate_limit_actor, RequestToken)?; // FIXME: (#6) handle error let attachment_path = this .ctx @@ -101,8 +99,6 @@ impl Actor for ImportAttachmentActor { attachment_file .remove() .with_context(|| f!("deleting temp file {attachment_file}"))?; // FIXME: (#6) handle error - dir.remove() - .with_context(|| f!("deleting temp dir {dir}"))?; // FIXME: (#6) handle error tracing::info!("ImportAttachmentActor finished"); Ok(actor_ref.stop_gracefully().await?)