Skip to content

Commit

Permalink
fix Snapper id too long #36
Browse files Browse the repository at this point in the history
* fix Snapper id too long #36
  • Loading branch information
Antynea authored Jan 6, 2018
1 parent 12cb591 commit 5cfbf46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 41_snapshots-btrfs
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ snapshot_list()
for id in "${ids[@]}"; do
for j in "${!snapper_ids[@]}"; do
local snapper_id="${snapper_ids[$j]//[[:space:]]/}"
if [[ "$snapper_id" -eq "$id" ]]; then
if [[ "$snapper_id" == "$id" ]]; then
local snapper_type=$(trim "${snapper_types[$j]}")
local length="${#snapper_type}"
[[ "$length" -gt "$max_type_length" ]] && max_type_length=$length
Expand All @@ -306,7 +306,7 @@ snapshot_list()
local entry="${entries[$i]}"
for j in "${!snapper_ids[@]}"; do
local snapper_id="${snapper_ids[$j]//[[:space:]]/}"
if [[ "$snapper_id" -eq "$id" ]]; then
if [[ "$snapper_id" == "$id" ]]; then
local snapper_type=$(trim "${snapper_types[$j]}")
local snapper_description=$(trim "${snapper_descriptions[$j]}")
printf -v entry "%-${max_entry_length}s | %-${max_type_length}s | %s" "$entry" "$snapper_type" "$snapper_description"
Expand Down

0 comments on commit 5cfbf46

Please sign in to comment.