Bug #9328

ifdh ls no such file behavior

Added by Dominick Rocco over 5 years ago. Updated over 5 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:


It seems like the ifdh ls behavior is somewhat undefined when the file or directory does not exist. I've seen it throw a RuntimeError, I've seen it return a list with zero entries, and recently I've seen it throw an IO error after doing a "find" command. Does this seem like total crazy talk? Or can those things really all happen?


#1 Updated by Marc Mengel over 5 years ago

  • Status changed from New to Closed
  • Assignee set to Marc Mengel
  • Target version set to v1_8_5

This has indeed been an issue; there were differences between the listing output
between different protocols (srm: vs gsiftp: vs local) and in different releases,
and there were some attempts to fix it in v1_8_x by having it raise an exception
if things weren't there.

It should now behave as the old srm: code (which was the default in v1_6 and v1_7):

  • listing an empty directory should give you a 1-line/list element result, of the directory name with a trailing slash
  • listing a nonexistent directory/file should give you a 0 line result/list element result
  • listing a directory with contents should give you a single line for the directory, with a trailng slash, and entries for the items in the directory.
  • the exit code from the ifdh executable when giving a 0 line result should be non-zero.

see af47ff0a

Also available in: Atom PDF