/[winpt]/trunk/Src/wptFileManager.cpp
ViewVC logotype

Diff of /trunk/Src/wptFileManager.cpp

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

revision 426 by twoaday, Mon Feb 6 19:39:00 2012 UTC revision 427 by twoaday, Sat Apr 7 11:50:43 2012 UTC
# Line 503  static int Line 503  static int
503  fm_add_dir_files (listview_ctrl_t lv, fm_model_t *fm, char *path)  fm_add_dir_files (listview_ctrl_t lv, fm_model_t *fm, char *path)
504  {  {
505      WIN32_FIND_DATA fd;      WIN32_FIND_DATA fd;
     HANDLE hd;  
     char *p;  
506    
507      strcat (path, "\\*");      strcat (path, "\\*");
508      hd = FindFirstFile (path, &fd);      HANDLE hd = FindFirstFile (path, &fd);
509      if (hd == INVALID_HANDLE_VALUE)      if (hd == INVALID_HANDLE_VALUE)
510          return -1;          return -1;
511      do {      do {
512          if (fd.cFileName[0] == '.' && strlen (fd.cFileName) < 3)          if (fd.cFileName[0] == '.' && strlen (fd.cFileName) < 3)
513              continue;              continue;
514          p = new char [strlen (path) + strlen (fd.cFileName)+1];          char *p = new char [strlen (path) + strlen (fd.cFileName)+1];
515          if (!p)          if (!p)
516              BUG (0);              BUG (0);
517          memcpy (p, path, strlen (path)-1);          memcpy (p, path, strlen (path)-1);
# Line 1827  fm_sort (listview_ctrl_t lv, int sortby) Line 1825  fm_sort (listview_ctrl_t lv, int sortby)
1825  int  int
1826  fm_send_file (listview_ctrl_t lv)  fm_send_file (listview_ctrl_t lv)
1827  {  {
1828      char name[MAX_PATH+1];      char name[MAX_PATH + 1];
1829    
1830      int rc = listview_get_item_text (lv, -1, FM_COL_NAME, name, DIM (name)-1);      int rc = listview_get_item_text (lv, -1, FM_COL_NAME, name, DIM (name)-1);
1831      if (rc != -1)      if (rc != -1)

Legend:
Removed from v.426  
changed lines
  Added in v.427

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26