Skip to content

Commit

Permalink
also allow old stale data to work
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyiq committed Apr 9, 2024
1 parent 8c2c057 commit d4d1cfe
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions classes/data/File.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,11 @@ public static function fromTransfer(Transfer $transfer)
$t->execute(array(':transfer_id' => $transfer->id,
':collection_type' => CollectionType::DIRECTORY_ID));
foreach ($t->fetchAll() as $data) {
$file = $files[$data['id']];
$file->pathCache = $data['dirpath'].'/'.$file->name;
$file->directoryCache = $directories[$data['dir_id']];
if( array_key_exists($data['id'],$files)) {
$file = $files[$data['id']];
$file->pathCache = $data['dirpath'].'/'.$file->name;
$file->directoryCache = $directories[$data['dir_id']];
}
}
}
return $files;
Expand Down

0 comments on commit d4d1cfe

Please sign in to comment.