RCS file: /cvsroot/scummvm/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp,v
retrieving revision 1.6
diff -u -r1.6 amigaos4-fs.cpp
|
|
|
33 | 33 | |
34 | 34 | #include <common/stdafx.h> |
35 | 35 | |
36 | | #include "util.h" |
| 36 | //#include "util.h" |
37 | 37 | |
38 | 38 | #include "base/engine.h" |
39 | 39 | #include "backends/fs/fs.h" |
… |
… |
|
116 | 116 | |
117 | 117 | struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL); |
118 | 118 | if (!fib) { |
119 | | debug(6, "fib == 0\n"); |
| 119 | //debug(6, "fib == 0\n"); |
120 | 120 | LEAVE(); |
121 | 121 | return; |
122 | 122 | } |
… |
… |
|
154 | 154 | if (IDOS->NameFromLock(pLock, name, bufsize) != DOSFALSE) { |
155 | 155 | _sPath = name; |
156 | 156 | _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart(name); |
157 | | delete name; |
| 157 | delete [] name; |
158 | 158 | break; |
159 | 159 | } |
160 | 160 | |
161 | 161 | if (IDOS->IoErr() != ERROR_LINE_TOO_LONG) { |
162 | 162 | _bIsValid = false; |
163 | | debug(6, "Error\n"); |
| 163 | //debug(6, "Error\n"); |
164 | 164 | LEAVE(); |
165 | | delete name; |
| 165 | delete [] name; |
166 | 166 | return; |
167 | 167 | } |
168 | 168 | bufsize *= 2; |
169 | | delete name; |
| 169 | delete [] name; |
170 | 170 | } |
171 | 171 | |
172 | 172 | _bIsValid = false; |
173 | 173 | |
174 | 174 | struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL); |
175 | 175 | if (!fib) { |
176 | | debug(6, "fib == 0\n"); |
| 176 | //debug(6, "fib == 0\n"); |
177 | 177 | LEAVE(); |
178 | 178 | return; |
179 | 179 | } |
… |
… |
|
219 | 219 | ENTER(); |
220 | 220 | |
221 | 221 | if (!_bIsValid) { |
222 | | debug(6, "Invalid node\n"); |
| 222 | //debug(6, "Invalid node\n"); |
223 | 223 | LEAVE(); |
224 | 224 | //return 0; |
225 | 225 | } |
226 | 226 | |
227 | 227 | if (!_bIsDirectory) { |
228 | | debug(6, "Not a directory\n"); |
| 228 | //debug(6, "Not a directory\n"); |
229 | 229 | LEAVE(); |
230 | 230 | //return 0; |
231 | 231 | } |
232 | 232 | |
233 | 233 | if (_pFileLock == 0) { |
234 | | debug(6, "Root node\n"); |
| 234 | //debug(6, "Root node\n"); |
235 | 235 | LEAVE(); |
236 | 236 | return listVolumes(); |
237 | 237 | } |
… |
… |
|
299 | 299 | AmigaOSFilesystemNode *node; |
300 | 300 | |
301 | 301 | if (!_bIsDirectory) { |
302 | | debug(6, "No directory\n"); |
| 302 | //debug(6, "No directory\n"); |
303 | 303 | LEAVE(); |
304 | 304 | return 0; |
305 | 305 | } |
306 | 306 | |
307 | 307 | if (_pFileLock == 0) { |
308 | | debug(6, "Root node\n"); |
| 308 | //debug(6, "Root node\n"); |
309 | 309 | LEAVE(); |
310 | 310 | return clone(); |
311 | 311 | } |
312 | 312 | |
313 | | BPTR parent = IDOS->ParentDir(_pFileLock); |
314 | | if (parent) { |
315 | | node = new AmigaOSFilesystemNode(parent); |
316 | | IDOS->UnLock(parent); |
| 313 | BPTR parentDir = IDOS->ParentDir( _pFileLock ); |
| 314 | if (parentDir) { |
| 315 | node = new AmigaOSFilesystemNode(parentDir); |
| 316 | IDOS->UnLock(parentDir); |
317 | 317 | } |
318 | 318 | else |
319 | 319 | node = new AmigaOSFilesystemNode(); |
… |
… |
|
334 | 334 | |
335 | 335 | dosList = IDOS->LockDosList(lockFlags); |
336 | 336 | if (!dosList) { |
337 | | debug(6, "Cannot lock dos list\n"); |
| 337 | //debug(6, "Cannot lock dos list\n"); |
338 | 338 | LEAVE(); |
339 | 339 | return myList; |
340 | 340 | } |