/[svn]/linuxsampler/trunk/src/db/InstrumentsDb.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/db/InstrumentsDb.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1912 by senoner, Sat Jun 6 16:48:00 2009 UTC revision 1944 by persson, Tue Jul 14 18:54:08 2009 UTC
# Line 27  Line 27 
27  #include <iostream>  #include <iostream>
28  #include <sstream>  #include <sstream>
29  #include <vector>  #include <vector>
30    #include <algorithm>
31  #include <errno.h>  #include <errno.h>
32  #ifndef WIN32  #ifndef WIN32
33  #include <fnmatch.h>  #include <fnmatch.h>
# Line 1225  namespace LinuxSampler { Line 1226  namespace LinuxSampler {
1226              }              }
1227    
1228              String s = FilePath;              String s = FilePath;
   
             #if WIN32  
             for (int i = 0; i < s.length(); i++) {  
                 if (s[i] == '\\') s[i] = '/';  
             }  
             #endif  
   
1229              s = toEscapedFsPath(s);              s = toEscapedFsPath(s);
1230              BindTextParam(pStmt, 2, s);              BindTextParam(pStmt, 2, s);
1231              String ver = "";              String ver = "";
# Line 1864  namespace LinuxSampler { Line 1858  namespace LinuxSampler {
1858      }      }
1859            
1860      String InstrumentsDb::toEscapedFsPath(String FsPath) {      String InstrumentsDb::toEscapedFsPath(String FsPath) {
1861    #ifdef WIN32
1862            replace(FsPath.begin(), FsPath.end(), '\\', '/');
1863    #endif
1864          return toEscapedText(FsPath);          return toEscapedText(FsPath);
1865      }      }
1866            
1867      String InstrumentsDb::toNonEscapedFsPath(String FsPath) {      String InstrumentsDb::toNonEscapedFsPath(String FsPath) {
1868          return toNonEscapedText(FsPath);          FsPath = toNonEscapedText(FsPath);
1869    #ifdef WIN32
1870            replace(FsPath.begin(), FsPath.end(), '/', '\\');
1871    #endif
1872            return FsPath;
1873      }      }
1874            
1875      String InstrumentsDb::toAbstractName(String DbName) {      String InstrumentsDb::toAbstractName(String DbName) {

Legend:
Removed from v.1912  
changed lines
  Added in v.1944

  ViewVC Help
Powered by ViewVC