Message3460

Author nriley
Recipients jy123, nriley
Date 2008-08-29.20:57:29
SpamBayes Score 3.066714e-05
Marked as misclassified No
Message-id <1220043450.36.0.908581721491.issue1110@psf.upfronthosting.co.za>
In-reply-to
Content
This is a bug/"feature" in the MSVCRT stat function, which Jython uses through jna-
posix.

#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>

int main(void) {
  struct stat foo;
  int retval = stat("c:\\Documents and Settings\\", &foo);
  fprintf(stderr, "stat returned %d\n", retval);
  perror("stat");
}

% ./stat
stat returned -1
stat: No such file or directory

If you remove the trailing \, it works fine.
History
Date User Action Args
2008-08-29 20:57:30nrileysetmessageid: <1220043450.36.0.908581721491.issue1110@psf.upfronthosting.co.za>
2008-08-29 20:57:30nrileysetrecipients: + nriley, jy123
2008-08-29 20:57:30nrileylinkissue1110 messages
2008-08-29 20:57:30nrileycreate