Closed (fixed)
Project:
e-Commerce
Version:
master
Component:
file
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2006 at 22:43 UTC
Updated:
12 Jan 2008 at 22:23 UTC
Jump to comment: Most recent file
The ec_file_transfer() function in file.module does no error checking.
If there are any problems downloading the file, it behaves badly. For instance, if the file cannot be opened due to permissions, the download appears to hang, timeout after a while, and results in an empty download.
Even worse, if a problem occurs partway through a download (the fread() fails) the user could end up with a partial file and no notice that a problem occurred.
Recommended fix is to check the return codes of fopen() and fread().
I'd offer a patch, but I'm not sure what the preferred behavior would be if the system call fails. Any suggestions? Is there some function I can call to display a nice error message?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | file_download_error_checking.patch | 2.08 KB | chip |
Comments
Comment #1
chip commentedpatch attached
Comment #2
brmassa commentedChip,
the File module has been rewritten for eC4.
regards,
massa
Comment #3
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.