Problem/Motivation

The EntityFile destination plugin copies files from one place to another. At the moment, it doesn't check if the source path actually exists, which means that copy() might eventually be called with an invalid source path. When it returns FALSE in that circumstance, the user will get a profoundly unhelpful "file could not be copied" exception.

Proposed Resolution

Before doing anything else, EntityFile should check if the source file actually exists, and throw a helpful exception if it doesn't.

Remaining Tasks

Discuss, then create a patch if needed.

API Changes

None.

UI Changes

None.

CommentFileSizeAuthor
#2 2483939-2.patch1000 bytesphenaproxima

Comments

phenaproxima’s picture

Issue summary: View changes
Priority: Normal » Minor

Downgrading priority.

phenaproxima’s picture

StatusFileSize
new1000 bytes

First stab at a patch.

phenaproxima’s picture

Status: Active » Needs review

Have at it, testbot!

Status: Needs review » Needs work

The last submitted patch, 2: 2483939-2.patch, failed testing.

phenaproxima’s picture

Status: Needs work » Closed (duplicate)

Because this patch intersects largely with the work being done in #2417975: EntityFile destination incorrectly assumes temporary files are absolute paths, I'm merging it into that one.