Update of /cvsroot/audacity/lib-src/libnyquist/nyquist/sys/win/msvc
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv8506/sys/win/msvc

Modified Files:
        winfun.c 
Log Message:
Updating to Nyquist v3.03.


Index: winfun.c
===================================================================
RCS file: /cvsroot/audacity/lib-src/libnyquist/nyquist/sys/win/msvc/winfun.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- winfun.c    29 Jan 2009 18:04:23 -0000      1.1
+++ winfun.c    5 Mar 2009 16:34:00 -0000       1.2
@@ -36,11 +36,25 @@
 /* xget_temp_path -- get a path to create temp files */
 LVAL xget_temp_path()
 {
+    char *p;
     char szDir[MAX_PATH];
+    char szDirLC[MAX_PATH];
     int rslt = GetTempPath(MAX_PATH, szDir);
     if (rslt > MAX_PATH || rslt <= 0) {
         return cvstring("");
     } else {
+        /* Vista apparently treats c:\windows with
+         * special semantics, so just don't allow
+         * GetTempPath to put us in c:\windows...
+         */
+        strcpy(szDirLC, szDir); /* convert to lower case */
+        for (p = szDirLC; *p; p++) { 
+            *p = tolower(*p);
+        }
+        if (strstr(szDirLC, "c:\\windows")) {
+            /* c:\windows is bad. */
+            return cvstring("");
+        }
         return cvstring(szDir);
     }
 }


------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs

Reply via email to