summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--application/migrations/014_deduplicate_file_storage.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/application/migrations/014_deduplicate_file_storage.php b/application/migrations/014_deduplicate_file_storage.php
index d01ab03a9..bc4171d1d 100644
--- a/application/migrations/014_deduplicate_file_storage.php
+++ b/application/migrations/014_deduplicate_file_storage.php
@@ -51,7 +51,9 @@ class Migration_deduplicate_file_storage extends CI_Migration {
$old = $this->mfile->file($item["hash"]);
$data_id = $item["hash"].'-'.$item["id"];
$new = $this->mfile->file($data_id);
- rename($old, $new);
+ if (file_exists($old)) {
+ rename($old, $new);
+ }
}
}