Author: ambs
Date: Fri Jan 13 12:55:07 2006
New Revision: 11158

Modified:
   trunk/src/classes/file.pmc
Log:
File.pmc - fixed lstats on windows.


Modified: trunk/src/classes/file.pmc
==============================================================================
--- trunk/src/classes/file.pmc  (original)
+++ trunk/src/classes/file.pmc  Fri Jan 13 12:55:07 2006
@@ -64,7 +64,11 @@ Returns a true value (1) if the supplied
     METHOD INTVAL is_dir(STRING *path) {
         struct stat info;
         char *cpath = string_to_cstring(interpreter, path);
+#ifdef WIN32
+        int error = stat(cpath, &info);
+#else
         int error = lstat(cpath, &info);
+#endif
         if (error) {
             char *errmsg = strerror(errno);
             real_exception(interpreter, NULL, E_SystemError, errmsg);
@@ -90,7 +94,11 @@ Returns a true value (1) if the supplied
     METHOD INTVAL is_file(STRING *path) {
         struct stat info;
         char *cpath = string_to_cstring(interpreter, path);
+#ifdef WIN32
+        int error = stat(cpath, &info);
+#else
         int error = lstat(cpath, &info);
+#endif
         if (error) {
             char *errmsg = strerror(errno);
             real_exception(interpreter, NULL, E_SystemError, errmsg);

Reply via email to