Rev 6176 | Rev 6278 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6176 | Rev 6251 | ||
---|---|---|---|
Line 55... | Line 55... | ||
55 | 55 | ||
56 | void SetPropertiesDir(dword way) |
56 | void SetPropertiesDir(dword way) |
57 | { |
57 | { |
58 | dword dirbuf, fcount, i, filename; |
58 | dword dirbuf, fcount, i, filename; |
59 | dword cur_file; |
59 | dword cur_file; |
60 | if (isdir(way)) |
60 | if (dir_exists(way)) |
61 | { |
61 | { |
62 | cur_file = malloc(4096); |
62 | cur_file = malloc(4096); |
63 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
63 | GetDir(#dirbuf, #fcount, way, DIRS_ONLYREAL); |
64 | for (i=0; i |
64 | for (i=0; i |
Line 103... | Line 103... | ||
103 | file_info_general.hidden = atr_hidden; |
103 | file_info_general.hidden = atr_hidden; |
104 | file_info_general.system = atr_system; |
104 | file_info_general.system = atr_system; |
105 | SetFileInfo(cur_file, #file_info_general); |
105 | SetFileInfo(cur_file, #file_info_general); |
106 | if (prop==2) |
106 | if (prop==2) |
107 | { |
107 | { |
108 | if (isdir(cur_file)) |
108 | if (dir_exists(cur_file)) |
109 | { |
109 | { |
110 | SetPropertiesDir(cur_file); |
110 | SetPropertiesDir(cur_file); |
111 | } |
111 | } |
112 | } |
112 | } |
113 | } |
113 | } |
Line 153... | Line 153... | ||
153 | 153 | ||
154 | void GetSizeDir(dword way) |
154 | void GetSizeDir(dword way) |
155 | { |
155 | { |
156 | dword dirbuf, fcount, i, filename; |
156 | dword dirbuf, fcount, i, filename; |
157 | dword cur_file; |
157 | dword cur_file; |
158 | if (isdir(way)) |
158 | if (dir_exists(way)) |
159 | { |
159 | { |
160 | cur_file = malloc(4096); |
160 | cur_file = malloc(4096); |
161 | // In the process of recursive descent, memory must be allocated dynamically, |
161 | // In the process of recursive descent, memory must be allocated dynamically, |
162 | // because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |
162 | // because the static memory -> was a bug !!! But unfortunately pass away to sacrifice speed. |