summeris2long / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

copyFile() doesn't check the exit status from "cp" #40

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
"cp" will return a nonzero exit status on error: if it lacks write permission, 
if it's writing to a read-only filesystem, if the filesystem is out of space, 
etc.  In all of these cases copyFile() should return false to notify the caller 
that there was an error.  That doesn't seem to be happening.

This was seen with v2.6, the latest stable release, and I'm attaching a patch 
tested ("cp" case only) against that version.  I have not tried the head of 
tree; the function looks a little different but I don't see any new exitCode 
checks in there.

BTW, in bug #24, there was a proposal to add a "newPermissions" argument to 
copyFile().  This would be a useful addition IMO, as incorrect permissions are 
a common pitfall of installing new scripts/binaries under /system.

Original issue reported on code.google.com by cerne...@gmail.com on 9 Jul 2013 at 12:23

Attachments:

GoogleCodeExporter commented 8 years ago
This bug has been fixed.

Can you submit your request as a feature request? 

I will address it a little bit later.

Original comment by Stericso...@gmail.com on 9 Jul 2013 at 1:42

Attachments: