change Regex for error handling
This commit is contained in:
parent
db6c9525b2
commit
c9a14c1a4e
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user