File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -948,10 +948,9 @@ def shares(self):
948948 self .logger .highlight (f"{ name :<15} { ',' .join (perms ):<15} { remark } " )
949949 return permissions
950950
951-
952951 def dir (self ): # noqa: A003
953952 search_path = ntpath .join (self .args .dir , "*" )
954- try :
953+ try :
955954 contents = self .conn .listPath (self .args .share , search_path )
956955 except SessionError as e :
957956 error = get_error_string (e )
@@ -960,7 +959,7 @@ def dir(self): # noqa: A003
960959 color = "magenta" if error in smb_error_status else "red" ,
961960 )
962961 return
963-
962+
964963 if not contents :
965964 return
966965
@@ -970,7 +969,6 @@ def dir(self): # noqa: A003
970969 full_path = ntpath .join (self .args .dir , content .get_longname ())
971970 self .logger .highlight (f"{ 'd' if content .is_directory () else 'f' } { 'rw-' if content .is_readonly () > 0 else 'r--' :<8} { content .get_filesize ():<15} { ctime (float (content .get_mtime_epoch ())):<30} { full_path :<45} " )
972971
973-
974972 @requires_admin
975973 def interfaces (self ):
976974 """
You can’t perform that action at this time.
0 commit comments