Closed (fixed)
Project:
backup
Version:
5.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
3 Jun 2007 at 17:56 UTC
Updated:
12 Jun 2007 at 00:55 UTC
The function pclose seems to not return the return code of the execusion.
I read on some forum that to have the real code we must use :
$ret=(pclose($fp)>>8)&0xFF;
instead of
//$retval = pclose($fp);
http://fr.php.net/manual/fr/function.pclose.php
With this correction my backup is now OK.
Je suis en version 4.4.4 de php.
Y also recommande to automaticly diseable the backup directory.
I add the three line in the file functions.inc.php
if ($file == $prefix_dir) {
continue;
}
And I change the prototype of backup_get_files function as :
backup_get_files(&$file_list, $prefix_dir)
| Comment | File | Size | Author |
|---|---|---|---|
| functions.inc_.php_.txt | 9.57 KB | guenneguez_t |
Comments
Comment #1
dmuth commentedDuly noted. I'll put this on my ever growing TODO list. :-P
-- Doug
Comment #2
dmuth commentedHi,
According to http://us2.php.net/pclose, pclose() now returns the exit status in the low-order byte.
Regarding your suggestion to disable the backup directory, I specifically chose not to do that, because I have no guarantee that someone will not set the backup directory to be their sites/ directory or someplace equally silly. If I were to implement that logic, said directory would then be excluded. I make use of the function backup_is_backup() to exclude any pre-existing backup files from the backup.
Thank you for the suggestions, though. I appreciate the concern.
-- Doug
Comment #3
dmuth commentedHi again,
After some thought, it occured to me a way to implement your suggestion of excluding the backup directory and ensuring that no legitimate data got excluded, so I went ahead and implemented it in the next release of the backup module!
You can view the status of the next release at http://drupal.org/node/151077
-- Doug