Closed (fixed)
Project:
File Framework
Version:
6.x-1.0-alpha5
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2011 at 09:38 UTC
Updated:
7 Dec 2011 at 18:38 UTC
Pretty sure it ran rm -f /
Just restoring the server now.
I had trouble with bitcache.
So was uninstalling as per:
drupal.org/node/425884
Message was exactly this.
Comments
Comment #1
jrobens commentedMore information
There is a bug in bitcache - doesn't check to see if 'file' is null. PHP just happy to process.
I just walloped a whole system with this - installed file framework for a couple of hours, it didn't install properly (as per http://drupal.org/node/425884).
Uninstall, uninstalled the entire machine.
It is basically a bug in bitcache.
file.install - you call
bitcache_delete_repository('file');
The reference to 'file' must have been null and then follows through in bitcache to:
foreach (glob($dirname . '/*', GLOB_NOSORT) as $file) {
Youch. I am going to raise a bug in bitcache as well. Can't be too paranoid with this stuff.
See file.inc in bitcache
function destroy(array $options = array()) {
if (!isset($options['contents']) || $options['contents'] !== FALSE) {
return $this->rmdir_rf($this->path); // delete the contents of the repository directory
}
/**
* Recursive version of rmdir(); use with extreme caution.
*
* @param $dirname
* the top-level directory that will be recursively removed
* @param $callback
* optional predicate function for determining if a file should be removed
*/
protected function rmdir_rf($dirname, $callback = NULL) {
$empty = TRUE; // begin with an optimistic mindset
foreach (glob($dirname . '/*', GLOB_NOSORT) as $file) {
if (is_dir($file)) {
if (!$this->rmdir_rf($file, $callback)) {
$empty = FALSE;
}
}
else if (is_file($file)) {
if (function_exists($callback) && !$callback($file)) {
$empty = FALSE;
continue;
}
@unlink($file);
}
else {
$empty = FALSE; // it's probably a symbolic link
}
}
// The reason for this elaborate safeguard is that Drupal will log even
// warnings that should have been suppressed with the @ operator.
// Otherwise, we'd just rely on the FALSE return value from rmdir().
return ($empty && @rmdir($dirname));
}
}
Comment #2
johanneshahn commentedthe latest dev version will fix that problem. (http://drupal.org/node/522878)
i would try to backport it to 6.x-1.0-alpha5
Comment #3
johanneshahn commentednew release 6.x-1.0-alpha6 to fix that problem.
please run update.php after install new 6.x-1.0-alpha6.
before try to uninstall please make sure that all bitcache repositories for fileframework had
the file2 adapter. Visible via MySQL table bitcache_repositories.