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); |
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) |