Skip to content

Commit

Permalink
Make sure that the writing functions get used when a write mode is
Browse files Browse the repository at this point in the history
specified.
  • Loading branch information
icculus committed Sep 26, 2001
1 parent e444f9e commit 3ad4abe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions archivers/dir.c
Expand Up @@ -209,7 +209,6 @@ static DirHandle *DIR_openArchive(const char *name, int forWriting)
if (strcmp((name + namelen) - seplen, dirsep) != 0)
strcat((char *) (retval->opaque), dirsep);

retval->funcs = &__PHYSFS_DirFunctions_DIR;
return(retval);
} /* DIR_openArchive */

Expand Down Expand Up @@ -293,7 +292,8 @@ static FileHandle *doOpen(DirHandle *h, const char *name, const char *mode)

retval->opaque = (void *) rc;
retval->dirHandle = h;
retval->funcs = &__PHYSFS_FileFunctions_DIR;
retval->funcs = (mode[0] == 'r') ?
&__PHYSFS_FileFunctions_DIR : &__PHYSFS_FileFunctions_DIRW;
return(retval);
} /* doOpen */

Expand Down

0 comments on commit 3ad4abe

Please sign in to comment.