File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -1059,10 +1059,14 @@ def _default_notebook_dir(self):
1059
1059
self .log .warning (_ ("\n notebook_dir is deprecated, use root_dir.\n " ))
1060
1060
return self .root_dir
1061
1061
1062
- @validate ('notebook_dir' )
1062
+ @observe ('notebook_dir' )
1063
1063
def _update_notebook_dir (self , change ):
1064
1064
self .log .warning (_ ("\n notebook_dir is deprecated, use root_dir.\n " ))
1065
- self .root_dir = change ['value' ]
1065
+ """Do a bit of validation of the notebook dir."""
1066
+ new = change ['new' ]
1067
+ # Check that notebook_dir and root_dir are equal
1068
+ if self .root_dir != new :
1069
+ self .root_dir = new
1066
1070
1067
1071
root_dir = Unicode (config = True ,
1068
1072
help = _ ("The directory to use for notebooks and kernels." )
@@ -1098,6 +1102,9 @@ def _update_root_dir(self, change):
1098
1102
new = change ['new' ]
1099
1103
self .config .FileContentsManager .root_dir = new
1100
1104
self .config .MappingKernelManager .root_dir = new
1105
+ # Check that notebook_dir and root_dir are equal
1106
+ if self .notebook_dir != new :
1107
+ self .notebook_dir = new
1101
1108
1102
1109
@observe ('server_extensions' )
1103
1110
def _update_server_extensions (self , change ):
You can’t perform that action at this time.
0 commit comments