File tree Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Expand file tree Collapse file tree 3 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -661,11 +661,12 @@ pub fn create_dir_all_excluded_from_backups_atomic(p: impl AsRef<Path>) -> Resul
661
661
}
662
662
663
663
/// Mark an existing directory as excluded from backups and indexing.
664
- pub fn exclude_from_backups_and_indexing ( p : impl AsRef < Path > ) -> Result < ( ) > {
664
+ ///
665
+ /// Errors in marking it are ignored.
666
+ pub fn exclude_from_backups_and_indexing ( p : impl AsRef < Path > ) {
665
667
let path = p. as_ref ( ) ;
666
668
exclude_from_backups ( path) ;
667
669
exclude_from_content_indexing ( path) ;
668
- Ok ( ( ) )
669
670
}
670
671
671
672
/// Marks the directory as excluded from archives/backups.
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ impl<'cfg> Source for GitSource<'cfg> {
135
135
// This does not use `create_dir_all_excluded_from_backups_atomic` for
136
136
// the same reason: we want to exclude it even if the directory already
137
137
// exists.
138
- exclude_from_backups_and_indexing ( & git_path) ? ;
138
+ exclude_from_backups_and_indexing ( & git_path) ;
139
139
140
140
let db_path = git_path. join ( "db" ) . join ( & self . ident ) ;
141
141
Original file line number Diff line number Diff line change @@ -822,9 +822,12 @@ impl<'cfg> Source for RegistrySource<'cfg> {
822
822
// This does not use `create_dir_all_excluded_from_backups_atomic` for
823
823
// the same reason: we want to exclude it even if the directory already
824
824
// exists.
825
+ //
826
+ // IO errors in creating and marking it are ignored, e.g. in case we're on a
827
+ // read-only filesystem.
825
828
let registry_base = self . config . registry_base_path ( ) ;
826
- registry_base. create_dir ( ) ?;
827
- exclude_from_backups_and_indexing ( & registry_base. into_path_unlocked ( ) ) ? ;
829
+ let _ = registry_base. create_dir ( ) ?;
830
+ exclude_from_backups_and_indexing ( & registry_base. into_path_unlocked ( ) ) ;
828
831
829
832
self . ops . block_until_ready ( )
830
833
}
You can’t perform that action at this time.
0 commit comments