equal
deleted
inserted
replaced
629 { |
629 { |
630 UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box |
630 UINT sem = SetErrorMode(SEM_FAILCRITICALERRORS); // disable 'no-disk' message box |
631 HANDLE h; |
631 HANDLE h; |
632 char paths[MAX_PATH]; |
632 char paths[MAX_PATH]; |
633 |
633 |
634 sprintf(paths, "%s\\%s", path, file); |
634 snprintf(paths, sizeof(paths), "%s\\%s", path, file); |
635 h = FindFirstFile(paths, fd); |
635 h = FindFirstFile(paths, fd); |
636 |
636 |
637 SetErrorMode(sem); // restore previous setting |
637 SetErrorMode(sem); // restore previous setting |
638 return h; |
638 return h; |
639 } |
639 } |
898 char *path = _fios_path; |
898 char *path = _fios_path; |
899 char *s; |
899 char *s; |
900 |
900 |
901 switch (item->type) { |
901 switch (item->type) { |
902 case FIOS_TYPE_DRIVE: |
902 case FIOS_TYPE_DRIVE: |
903 sprintf(path, "%c:\\", item->title[0]); |
903 sprintf(path, "%c:", item->title[0]); |
904 break; |
904 break; |
905 |
905 |
906 case FIOS_TYPE_PARENT: |
906 case FIOS_TYPE_PARENT: |
907 s = strrchr(path, '\\'); |
907 s = strrchr(path, '\\'); |
908 if (s != path + 2) |
908 if (s != path + 2) |