@@ -437,7 +437,7 @@ def get(self, path, content=True, type=None, format=None):
437437 raise web .HTTPError (404 , four_o_four )
438438
439439 if is_hidden (os_path , self .root_dir ) and not self .allow_hidden :
440- self .log .info ("Refusing to serve hidden file or file in hidden directory %r, via 404 Error" , os_path )
440+ self .log .info ("Refusing to serve hidden file or directory %r, via 404 Error" , os_path )
441441 raise web .HTTPError (404 , four_o_four )
442442
443443
@@ -459,7 +459,7 @@ def get(self, path, content=True, type=None, format=None):
459459 def _save_directory (self , os_path , model , path = '' ):
460460 """create a directory"""
461461 if is_hidden (os_path , self .root_dir ) and not self .allow_hidden :
462- raise web .HTTPError (400 , f'Cannot create hidden directory { os_path !r} ' )
462+ raise web .HTTPError (400 , f'Cannot create directory { os_path !r} ' )
463463 if not os .path .exists (os_path ):
464464 with self .perm_to_403 ():
465465 os .mkdir (os_path )
@@ -480,7 +480,7 @@ def save(self, model, path=''):
480480 os_path = self ._get_os_path (path )
481481
482482 if is_hidden (os_path , self .root_dir ) and not self .allow_hidden :
483- raise web .HTTPError (400 , f'Cannot create hidden file or directory { os_path !r} ' )
483+ raise web .HTTPError (400 , f'Cannot create file or directory { os_path !r} ' )
484484
485485 self .log .debug ("Saving %s" , os_path )
486486
@@ -532,7 +532,7 @@ def delete_file(self, path):
532532 raise web .HTTPError (404 , four_o_four )
533533
534534 if is_hidden (os_path , self .root_dir ) and not self .allow_hidden :
535- raise web .HTTPError (400 , f'Cannot delete hidden file or directory { os_path !r} ' )
535+ raise web .HTTPError (400 , f'Cannot delete file or directory { os_path !r} ' )
536536
537537 def is_non_empty_dir (os_path ):
538538 if os .path .isdir (os_path ):
@@ -576,7 +576,7 @@ def rename_file(self, old_path, new_path):
576576 return
577577
578578 if (is_hidden (old_path , self .root_dir ) or is_hidden (new_path , self .root_dir )) and not self .allow_hidden :
579- raise web .HTTPError (400 , f'Cannot rename hidden file or directory { os_path !r} ' )
579+ raise web .HTTPError (400 , f'Cannot rename file or directory { os_path !r} ' )
580580
581581 # Perform path validation prior to converting to os-specific value since this
582582 # is still relative to root_dir.
0 commit comments