Fix bug if we don't have Joliet around.

This commit is contained in:
rocky
2005-04-15 05:06:09 +00:00
parent 43baf9cbdf
commit 2ecc6106d7

View File

@@ -1,5 +1,5 @@
/*
$Id: iso9660_fs.c,v 1.27 2005/03/03 13:47:59 rocky Exp $
$Id: iso9660_fs.c,v 1.28 2005/04/15 05:06:09 rocky Exp $
Copyright (C) 2001 Herbert Valerio Riedel <hvr@gnu.org>
Copyright (C) 2003, 2004, 2005 Rocky Bernstein <rocky@panix.com>
@@ -52,7 +52,7 @@
#include <stdio.h>
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.27 2005/03/03 13:47:59 rocky Exp $";
static const char _rcsid[] = "$Id: iso9660_fs.c,v 1.28 2005/04/15 05:06:09 rocky Exp $";
/* Implementation of iso9660_t type */
struct _iso9660_s {
@@ -828,11 +828,11 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa,
}
strncpy(p_stat->filename, rr_fname, i_rr_fname+1);
} else {
#ifdef HAVE_JOLIET
if ('\0' == p_iso9660_dir->filename[0] && 1 == i_fname)
strcpy (p_stat->filename, ".");
else if ('\1' == p_iso9660_dir->filename[0] && 1 == i_fname)
strcpy (p_stat->filename, "..");
#ifdef HAVE_JOLIET
else if (i_joliet_level) {
int i_inlen = i_fname;
int i_outlen = (i_inlen / 2);
@@ -841,9 +841,9 @@ _iso9660_dir_to_statbuf (iso9660_dir_t *p_iso9660_dir, bool_3way_t b_xa,
i_outlen);
strncpy(p_stat->filename, p_psz_out, i_fname);
free(p_psz_out);
} else
}
#endif /*HAVE_JOLIET*/
{
else {
strncpy (p_stat->filename, p_iso9660_dir->filename, i_fname);
}
}