* Ian Ferguson <[EMAIL PROTECTED]> [2004-05-31T11:08:48] > I am trying to write an interactive script that prompts the user to specify > a path to a DMG file on their system. It seems that once a file is inputted > via drag and drop in this manner, the file does not seem to exist to the > script. I figured at first this may be due to the shell escaping the input, > but removing these escapes did not help matters. Here is what I built to > describe my issue (tested with directories w/ spaces on purpose):
You never tried looking carefully at the dropped filename, from what I see. Check it out and I believe you'll find that a space is added at the end of the filename. So, if you drag and drop "/foo/bar.txt" and hit enter, you actually get "/foo/bar.txt \n". You chomp once, but you're left with the trailing space. Remove that, too. -- rjbs
pgpmGv1J0Uy3Y.pgp
Description: PGP signature
