Skip to content

Commit

Permalink
Skip empty (mapped rootfs) volumes. Sidenote: They result in empty st…
Browse files Browse the repository at this point in the history
…rings for tar (because of rtrim) but we should actively sort them out anyway.
  • Loading branch information
Commifreak committed Apr 15, 2023
1 parent 3e45863 commit c6709e4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/include/ABHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,11 @@ public static function getContainerVolumes($container) {

$volumes = [];
foreach ($container['Volumes'] ?? [] as $volume) {
$hostPath = explode(":", $volume)[0];
$hostPath = rtrim(explode(":", $volume)[0], '/');
if (empty($hostPath)) {
self::backupLog("This volume is empty (rootfs mapped??)! Ignoring.", self::LOGLEVEL_DEBUG);
continue;
}
$volumes[] = rtrim($hostPath, '/');
}
return $volumes;
Expand Down

0 comments on commit c6709e4

Please sign in to comment.