- Notifications
You must be signed in to change notification settings - Fork5
Commitb84334b
Michael Paquier
Remove unportable code of IsDir
IsDir was somewhat optimized on systems where DT_DIR (dirent.d_typebeing not part of the POSIX spec) is present on some systems leadingto more complex logic depending on the file system used, particularlyon XFS this routine was actually broken. Having a call to stat()should not be that expensive to check if a path is a directory ornot and this is proving to be far more stable coding, so just relyon that, that's more portable anyway and will avoid future surprises.Report by Yury Zhuravlev, though I did not use his patch.1 parent7254d30 commitb84334b
1 file changed
+9
-18
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | 95 | | |
103 | 96 | | |
104 | 97 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 98 | + | |
108 | 99 | | |
109 | 100 | | |
110 | | - | |
111 | 101 | | |
112 | 102 | | |
113 | 103 | | |
| |||
157 | 147 | | |
158 | 148 | | |
159 | 149 | | |
160 | | - | |
| 150 | + | |
161 | 151 | | |
162 | 152 | | |
163 | 153 | | |
| |||
183 | 173 | | |
184 | 174 | | |
185 | 175 | | |
186 | | - | |
187 | | - | |
| 176 | + | |
| 177 | + | |
188 | 178 | | |
189 | 179 | | |
190 | 180 | | |
191 | 181 | | |
192 | | - | |
193 | | - | |
| 182 | + | |
| 183 | + | |
194 | 184 | | |
195 | 185 | | |
196 | 186 | | |
197 | 187 | | |
198 | | - | |
| 188 | + | |
199 | 189 | | |
| 190 | + | |
200 | 191 | | |
201 | 192 | | |
202 | 193 | | |
| |||
0 commit comments
Comments
(0)