src/core/model/system-path.cc
changeset 9894 ac4e52a91d5d
parent 9785 97052ab05772
child 10968 2d29fee2b7b8
equal deleted inserted replaced
9893:18f2d30eddbe 9894:ac4e52a91d5d
   108     filename = buffer;
   108     filename = buffer;
   109     free (buffer);
   109     free (buffer);
   110   }
   110   }
   111 #elif defined (__win32__)
   111 #elif defined (__win32__)
   112   {
   112   {
   113     // XXX: untested. it should work if code is compiled with
   113     /// \todo untested. it should work if code is compiled with
   114     // LPTSTR = char *
   114     /// LPTSTR = char *
   115     DWORD size = 1024;
   115     DWORD size = 1024;
   116     LPTSTR lpFilename = (LPTSTR) malloc (sizeof(TCHAR) * size);
   116     LPTSTR lpFilename = (LPTSTR) malloc (sizeof(TCHAR) * size);
   117     DWORD status = GetModuleFilename (0, lpFilename, size);
   117     DWORD status = GetModuleFilename (0, lpFilename, size);
   118     while (status == size)
   118     while (status == size)
   119       {
   119       {
   230       files.push_back (de->d_name);
   230       files.push_back (de->d_name);
   231       de = readdir (dp);
   231       de = readdir (dp);
   232     }
   232     }
   233   closedir (dp);
   233   closedir (dp);
   234 #elif defined (HAVE_FIND_FIRST_FILE)
   234 #elif defined (HAVE_FIND_FIRST_FILE)
   235   // XXX: untested
   235   /// \todo untested
   236   HANDLE hFind;
   236   HANDLE hFind;
   237   WIN32_FIND_DATA fileData;
   237   WIN32_FIND_DATA fileData;
   238   
   238   
   239   hFind = FindFirstFile (path.c_str (), &FindFileData);
   239   hFind = FindFirstFile (path.c_str (), &FindFileData);
   240   if (hFind == INVALID_HANDLE_VALUE)
   240   if (hFind == INVALID_HANDLE_VALUE)