File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -497,8 +497,7 @@ make_directory_full(const Filename &filename) {
497
497
// Now make the last one, and check the return value.
498
498
PT (VirtualFile) result = do_get_file (filename, OF_make_directory);
499
499
_lock.unlock ();
500
- nassertr_always (result != nullptr , false );
501
- return result->is_directory ();
500
+ return (result != nullptr ) ? result->is_directory () : false ;
502
501
}
503
502
504
503
/* *
Original file line number Diff line number Diff line change @@ -133,10 +133,16 @@ set_root(const Filename &root) {
133
133
delete _index;
134
134
_index = new BamCacheIndex;
135
135
_index_stale_since = 0 ;
136
+
137
+ if (!vfs->is_directory (_root)) {
138
+ util_cat.error ()
139
+ << " Unable to make directory " << _root << " , caching disabled.\n " ;
140
+ _active = false ;
141
+ return ;
142
+ }
143
+
136
144
read_index ();
137
145
check_cache_size ();
138
-
139
- nassertv (vfs->is_directory (_root));
140
146
}
141
147
142
148
/* *
You can’t perform that action at this time.
0 commit comments