diff --git a/puren_tonbo/tools/ptig.py b/puren_tonbo/tools/ptig.py index e04ebef..3ce736a 100755 --- a/puren_tonbo/tools/ptig.py +++ b/puren_tonbo/tools/ptig.py @@ -286,12 +286,14 @@ def do_ls(self, line=None): # TODO show file size and timestamps line = self.validate_result_id(line) if line is None: - return + #return + # assume current directory (for now, that means root directory) + line = '.' sub_dir = os.path.dirname(line) # similar open to opendir - but for directory listings, i.e. can NOT ls/dir a single file (future TODO?) print('DEBUG sub_dir %s' % sub_dir) note_encoding = self.pt_config['codec'] - note_root = self.paths_to_search[0] # TODO just pick the first one, ignore everthing else + note_root = self.paths_to_search[0] # FIXME handle multiple note dirs, read and new do. TODO just pick the first one, ignore everthing else notes = puren_tonbo.FileSystemNotes(note_root, note_encoding) # TODO handle; puren_tonbo.PurenTonboIO: outside of note tree root? no need, handled by validate_result_id() # FIXME/TODO results list with numbers?