File tree 1 file changed +17
-11
lines changed
1 file changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -536,19 +536,25 @@ impl DomainStorage {
536
536
}
537
537
}
538
538
pub fn check_if_empty_index ( & self , host : & str , path : & str ) -> bool {
539
- self . meta
540
- . get ( host)
541
- . map ( |v| match v. value ( ) {
542
- DomainMeta :: OneWeb { .. } => path. is_empty ( ) ,
543
- DomainMeta :: MultipleWeb ( map) => {
544
- if path. len ( ) > 1 {
545
- map. contains_key ( & path[ 1 ..] )
546
- } else {
547
- map. contains_key ( path)
539
+ match self . meta
540
+ . get ( host) {
541
+ Some ( v) => {
542
+ match v. value ( ) {
543
+ DomainMeta :: OneWeb { .. } => path. is_empty ( ) ,
544
+ DomainMeta :: MultipleWeb ( map) => {
545
+ if path. len ( ) > 1 {
546
+ map. contains_key ( & path[ 1 ..] )
547
+ } else {
548
+ map. contains_key ( path)
549
+ }
548
550
}
549
551
}
550
- } )
551
- . unwrap_or ( false )
552
+ } ,
553
+ None => {
554
+ debug ! ( "{host} {path} does not exists in meta" ) ;
555
+ false
556
+ }
557
+ }
552
558
}
553
559
554
560
pub fn save_file (
You can’t perform that action at this time.
0 commit comments