Changeset 3000 in kBuild
- Timestamp:
- Nov 5, 2016 7:39:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/nt/fts-nt.c
r2999 r3000 557 557 if (p->fts_flags & FTS_SYMFOLLOW) 558 558 p->fts_symfd = INVALID_HANDLE_VALUE; 559 559 if (p->fts_dirfd != INVALID_HANDLE_VALUE) { 560 560 birdCloseFile(p->fts_dirfd); 561 561 p->fts_dirfd = INVALID_HANDLE_VALUE; 562 563 562 } 563 fts_free_entry(tmp); 564 564 p->fts_info = p->fts_errno ? FTS_ERR : FTS_DP; 565 565 return (sp->fts_cur = p); … … 708 708 */ 709 709 fDirOpenFlags = BIRDDIR_F_EXTRA_INFO | BIRDDIR_F_KEEP_HANDLE; 710 710 if (cur->fts_dirfd == INVALID_HANDLE_VALUE) { 711 711 if (cur->fts_parent->fts_dirfd != INVALID_HANDLE_VALUE) { 712 712 /* (This works fine for symlinks too, since we follow them.) */ … … 728 728 OBJ_CASE_INSENSITIVE); 729 729 } 730 730 } else { 731 731 fDirOpenFlags |= BIRDDIR_F_RESTART_SCAN; 732 732 } … … 750 750 * each new name into the path. 751 751 */ 752 752 if (sp->fts_options & FTS_NO_ANSI) { 753 753 len = maxlen = 0; 754 754 } else { … … 1003 1003 len = sizeof(FTSENT) + (cwcname + 1) * sizeof(wchar_t); 1004 1004 if (!(sp->fts_options & FTS_NO_ANSI)) 1005 1005 len += namelen + 1; 1006 1006 p = malloc(len); 1007 1007 if (p) { … … 1083 1083 fts_alloc_utf16(FTS *sp, wchar_t const *wcsname, size_t cwcname) 1084 1084 { 1085 1086 1087 1085 FTSENT *pRet; 1086 1087 if (sp->fts_options & FTS_NO_ANSI) { 1088 1088 pRet = fts_alloc(sp, NULL, 0, wcsname, cwcname); 1089 1089 } else { 1090 1090 MY_UNICODE_STRING UniStr; 1091 1091 MY_ANSI_STRING AnsiStr; … … 1106 1106 } 1107 1107 } 1108 1108 return pRet; 1109 1109 } 1110 1110 … … 1138 1138 * the way the caller checks things out! */ 1139 1139 1140 1140 if (more) { 1141 1141 sp->fts_pathlen += more + 256; 1142 1142 ptr = realloc(sp->fts_path, sp->fts_pathlen); … … 1150 1150 return 1; 1151 1151 } 1152 1153 1154 1152 } 1153 1154 if (cwcmore) { 1155 1155 sp->fts_cwcpath += cwcmore + 256; 1156 1156 ptr = realloc(sp->fts_wcspath, sp->fts_cwcpath); … … 1164 1164 return 1; 1165 1165 } 1166 1166 } 1167 1167 return 0; 1168 1168 }
Note:
See TracChangeset
for help on using the changeset viewer.