[racket] Behavior of file-exists? and directory-list

From: Tim Nelson (tbnelson at gmail.com)
Date: Fri Dec 7 10:27:02 EST 2012

Good catch. No, it isn't:  I was experimenting with the various
java* executables to see if there was a difference, and pasted the wrong
interaction. The problem occurs for both files (and indeed many others!)

I guess it could have to do with soft links. I tried copying the exe from
the java folder itself into System32, but that had no effect. Even if the
problem is soft-links though, I would expect directory-list to show the
links!

One thing I haven't tried is other folders. I'll give that a shot when I
get home today. But it doesn't look like a universal problem, given Niklas'
report upthread.

Thanks,
- T

On Fri, Dec 7, 2012 at 6:53 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:

> This last interaction shows "javaw.exe", whereas the others used
> "java.exe". Is that difference significant?
>
> As a wild guess, I wonder whether filesystem soft links might be
> related, since I never got around to supporting those on Windows (sinc
> they're relatively new to Windows).
>
> At Thu, 6 Dec 2012 19:09:24 -0500, Tim Nelson wrote:
> > It actually _is_ in my PATH already:
> >
> > > (find-executable-path "javaw.exe")
> > #<path:C:\Windows\system32\javaw.exe>
> > > (getenv "PATH")
> > "...;C:\\Windows\\system32;..."
> >
> > (Other members of PATH omitted.) Weird, huh? Something is wonky. I even
> > tried changing the capitalization of "system" on the off chance that case
> > mattered, but nope.
> >
> > Ben: Thanks for the ref. I should have thought to look at the C code.
> >  (Would Racket blinders cause Racket to ignore some of its own code? ;-)
> )
> >
> > On Thu, Dec 6, 2012 at 7:00 PM, Danny Yoo <dyoo at hashcollision.org>
> wrote:
> >
> > >
> > >
> > > On Thu, Dec 6, 2012 at 4:22 PM, Tim Nelson <tbnelson at gmail.com> wrote:
> > >
> > >> Thanks for the hint Danny. I didn't know about that function... but
> I'm
> > >> sorry to say that
> > >>
> > >> > (find-executable-path "java.exe")
> > >> #f
> > >>
> > >> whereas from cmd:
> > >> > where java
> > >> C:\Windows\System32\java.exe
> > >>
> > >> so the command line knows about it, and I can use it, but it is
> concealed
> > >> from Racket, even via find-executable-path. That's probably a more
> concise
> > >> statement of my problem!
> > >>
> > >>
> > > Ugh.  Ok, that was _supposed_ to work.
> > >
> > > Out of curiosity, what happens if you add C:\Windows\System32 to your
> PATH?
> > >
> > >  (I know that's not the right solution, and it sounds like there's some
> > > Windows weirdness involved here.)
> > >
> > ____________________
> >   Racket Users list:
> >   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121207/7bccf438/attachment-0001.html>

Posted on the users mailing list.