ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/BasiliskII/src/extfs.cpp
(Generate patch)

Comparing BasiliskII/src/extfs.cpp (file contents):
Revision 1.11 by cebix, 1999-11-08T16:43:06Z vs.
Revision 1.13 by cebix, 1999-11-08T18:05:55Z

# Line 1898 | Line 1898 | static int16 fs_delete(uint32 pb, uint32
1898                  return result;
1899  
1900          // Delete file
1901 <        if (remove(full_path) < 0) {
1902 <                int16 err = errno2oserr();
1903 <                if (errno == EISDIR) {  // Workaround for BeOS bug
1904 <                        if (rmdir(full_path) < 0)
1905 <                                return errno2oserr();
1906 <                        else
1907 <                                return noErr;
1908 <                } else
1909 <                        return err;
1910 <        } else
1901 >        if (!extfs_remove(full_path))
1902 >                return errno2oserr();
1903 >        else
1904                  return noErr;
1905   }
1906  
# Line 1940 | Line 1933 | static int16 fs_rename(uint32 pb, uint32
1933  
1934          // Rename item
1935          D(bug("  renaming %s -> %s\n", old_path, full_path));
1936 <        if (rename(old_path, full_path) < 0)
1936 >        if (!extfs_rename(old_path, full_path))
1937                  return errno2oserr();
1938          else {
1939                  // The ID of the old file/dir has to stay the same, so we swap the IDs of the FSItems
# Line 1983 | Line 1976 | static int16 fs_cat_move(uint32 pb)
1976  
1977          // Move item
1978          D(bug("  moving %s -> %s\n", old_path, full_path));
1979 <        if (rename(old_path, full_path) < 0)
1979 >        if (!extfs_rename(old_path, full_path))
1980                  return errno2oserr();
1981          else {
1982                  // The ID of the old file/dir has to stay the same, so we swap the IDs of the FSItems

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines