Ticket #8508: amigaos4_changes.diff

File amigaos4_changes.diff, 2.6 KB (added by SF/capehill, 18 years ago)

amigaos4-fs fixes

  • scummvm/backends/fs/amigaos4/amigaos4-fs.cpp

    RCS file: /cvsroot/scummvm/scummvm/backends/fs/amigaos4/amigaos4-fs.cpp,v
    retrieving revision 1.6
    diff -u -r1.6 amigaos4-fs.cpp
     
    3333
    3434#include <common/stdafx.h>
    3535
    36 #include "util.h"
     36//#include "util.h"
    3737
    3838#include "base/engine.h"
    3939#include "backends/fs/fs.h"
     
    116116
    117117        struct FileInfoBlock *fib = (struct FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
    118118        if (!fib) {
    119                 debug(6, "fib == 0\n");
     119                //debug(6, "fib == 0\n");
    120120                LEAVE();
    121121                return;
    122122        }
     
    154154                if (IDOS->NameFromLock(pLock, name, bufsize) != DOSFALSE) {
    155155                        _sPath = name;
    156156                        _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart(name);
    157                         delete name;
     157                        delete [] name;
    158158                        break;
    159159                }
    160160
    161161                if (IDOS->IoErr() != ERROR_LINE_TOO_LONG) {
    162162                        _bIsValid = false;
    163                         debug(6, "Error\n");
     163                        //debug(6, "Error\n");
    164164                        LEAVE();
    165                         delete name;
     165                        delete [] name;
    166166                        return;
    167167                }
    168168                bufsize *= 2;
    169                 delete name;
     169                delete [] name;
    170170        }
    171171
    172172        _bIsValid =     false;
    173173
    174174        struct FileInfoBlock *fib = (struct     FileInfoBlock *)IDOS->AllocDosObject(DOS_FIB, NULL);
    175175        if (!fib) {
    176                 debug(6, "fib == 0\n");
     176                //debug(6, "fib == 0\n");
    177177                LEAVE();
    178178                return;
    179179        }
     
    219219        ENTER();
    220220
    221221        if (!_bIsValid) {
    222                 debug(6, "Invalid node\n");
     222                //debug(6, "Invalid node\n");
    223223                LEAVE();
    224224                //return 0;
    225225        }
    226226
    227227        if (!_bIsDirectory) {
    228                 debug(6, "Not a directory\n");
     228                //debug(6, "Not a directory\n");
    229229                LEAVE();
    230230                //return 0;
    231231        }
    232232
    233233        if (_pFileLock == 0) {
    234                 debug(6, "Root node\n");
     234                //debug(6, "Root node\n");
    235235                LEAVE();
    236236                return listVolumes();
    237237        }
     
    299299        AmigaOSFilesystemNode *node;
    300300
    301301        if (!_bIsDirectory) {
    302                 debug(6, "No directory\n");
     302                //debug(6, "No directory\n");
    303303                LEAVE();
    304304                return 0;
    305305        }
    306306
    307307        if (_pFileLock == 0) {
    308                 debug(6, "Root node\n");
     308                //debug(6, "Root node\n");
    309309                LEAVE();
    310310                return clone();
    311311        }
    312312
    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);
    317317        }
    318318        else
    319319                node = new AmigaOSFilesystemNode();
     
    334334
    335335        dosList = IDOS->LockDosList(lockFlags);
    336336        if (!dosList) {
    337                 debug(6, "Cannot lock dos list\n");
     337                //debug(6, "Cannot lock dos list\n");
    338338                LEAVE();
    339339                return myList;
    340340        }