Parcourir la source

fix(details): fix to show last backup (#3348)

Christian il y a 5 ans
Parent
commit
5fc8953bdc
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lgsm/functions/info_distro.sh

+ 1 - 1
lgsm/functions/info_distro.sh

@@ -214,7 +214,7 @@ if [ -d "${backupdir}" ]; then
 		# number of backups.
 		backupcount=$(find "${backupdir}"/*.tar.gz | wc -l)
 		# most recent backup.
-		lastbackup=$(ls -1tr "${backupdir}"/*.tar.gz | head -1)
+		lastbackup=$(ls -1t "${backupdir}"/*.tar.gz | head -1)
 		# date of most recent backup.
 		lastbackupdate=$(date -r "${lastbackup}")
 		# no of days since last backup.