diff --git a/controls_FHEMbackup.txt b/controls_FHEMbackup.txt index 0354053..78c3159 100644 --- a/controls_FHEMbackup.txt +++ b/controls_FHEMbackup.txt @@ -1,2 +1,2 @@ UPD 2021-04-23_12:44:47 3363 FHEM/98_backup.pm -UPD 2021-04-23_17:20:10 8871 lib/FHEM/Core/Utils/FHEMbackup.pm +UPD 2021-04-24_15:35:54 8885 lib/FHEM/Core/Utils/FHEMbackup.pm diff --git a/lib/FHEM/Core/Utils/FHEMbackup.pm b/lib/FHEM/Core/Utils/FHEMbackup.pm index aa6a076..11b8747 100644 --- a/lib/FHEM/Core/Utils/FHEMbackup.pm +++ b/lib/FHEM/Core/Utils/FHEMbackup.pm @@ -67,12 +67,12 @@ sub CommandBackup { $ret = addConfDBFiles( $configfile, $statefile ); return ::Log(1, qq(Backup ERROR - addConfDBFiles: $ret)) if ( defined($ret) - && $ret =~ m{\ACan\'t\sopen.*}xms); - + && $ret =~ m{\ACan\'t\sopen.*:\s.*}xms); + $ret = readModpath( $modpath, $backupdir ); return ::Log(1, qq(Backup ERROR - readModpath: $ret)) if ( defined($ret) - && $ret =~ m{\ACan\'t\sopen.*}xms); + && $ret =~ m{\ACan\'t\sopen\s\$modpath:\s.*}xms); ## add all logfile path to pathname array $ret = addLogPathToPathnameArray(); @@ -199,7 +199,7 @@ sub readModpath { my $ret; if ( !opendir( DH, $modpath ) ) { - $msg = 'Can\'t open $modpath: ' . $!; + $msg = qq(Can't open \$modpath: $!); ::Log(1, qq(backup $msg)); return $msg; }