lavv17 / lftp

sophisticated command line file transfer program (ftp, http, sftp, fish, torrent)
http://lftp.yar.ru
GNU General Public License v3.0
1.08k stars 159 forks source link

glob --exists absolute path (without wildcard) ? #728

Open indexofrefraction opened 1 month ago

indexofrefraction commented 1 month ago

hi, i noticed that if you want to check for the existance of a file or directory it is needed to include a pattern in glob, otherwise you don't get the correct return value.

eg. glob --exists -d my_directory does NOT work, it returns 0 in any case

glob --exists -d my_dir*ctory works, but is unsafe in some situations

if you have hardcoded paths (no variables) then this is a safe workaround glob --exists -d my_dir[e]ctory

but is there a way to check for an absolute path? (without using wildcards)