File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
jupyter_server/services/contents Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -70,15 +70,8 @@ def _default_preferred_dir(self):
70
70
DeprecationWarning ,
71
71
stacklevel = 3 ,
72
72
)
73
- # For transitioning to relative path, we check if it is a valid relative path:
74
- try :
75
- if not os .path .isabs (value ) and self .dir_exists (value ):
76
- return value
77
- except HTTPError :
78
- pass
79
- value = self .parent ._normalize_dir (value )
80
73
if not os .path .isdir (value ):
81
- raise TraitError (_i18n ("No such directory : %r" ) % value )
74
+ raise TraitError (_i18n ("No such preferred dir : %r" ) % value )
82
75
if not (value + os .path .sep ).startswith (self .root_dir ):
83
76
raise TraitError ("%s is outside root contents directory" % value )
84
77
return os .path .relpath (value , self .root_dir ).replace (os .path .sep , "/" )
@@ -87,7 +80,7 @@ def _default_preferred_dir(self):
87
80
@validate ("preferred_dir" )
88
81
def _validate_preferred_dir (self , proposal ):
89
82
try :
90
- super ()._validate_preferred_dir (proposal )
83
+ return super ()._validate_preferred_dir (proposal )
91
84
except HTTPError as e :
92
85
raise TraitError (e .log_message ) from e
93
86
You can’t perform that action at this time.
0 commit comments