summaryrefslogtreecommitdiff
path: root/lib/isobuilder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/isobuilder.cpp')
-rw-r--r--lib/isobuilder.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/lib/isobuilder.cpp b/lib/isobuilder.cpp
index 85760d5..d267063 100644
--- a/lib/isobuilder.cpp
+++ b/lib/isobuilder.cpp
@@ -17,7 +17,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-/* $Id: isobuilder.cpp,v 1.7 2003-12-08 15:12:57 pixel Exp $ */
+/* $Id: isobuilder.cpp,v 1.8 2003-12-10 02:59:32 pixel Exp $ */
#include "isobuilder.h"
@@ -150,9 +150,9 @@ void isobuilder::DirTree::dumpdirs(isobuilder * builder) throw (GeneralException
for (p = child; p; p = p->brother) {
if (p->dir) {
p->dumpdirs(builder);
- if (p->hardhide)
- continue;
}
+ if (p->hardhide)
+ continue;
while (!(R = p->buildentry(dir, cursectsize))) {
cursiz -= 2048;
dir += cursectsize;
@@ -329,6 +329,7 @@ void isobuilder::DirTree::fromdir(cdutils::DirEntry * d) {
t.second = d->Second;
t.hundredths = 0;
t.offset = d->Offset;
+ creation = t;
s = 33 + d->N;
if (s & 1) {
@@ -353,6 +354,10 @@ void isobuilder::DirTree::fromdir(cdutils::DirEntry * d) {
}
}
+bool isobuilder::DirTree::isdir() {
+ return dir;
+}
+
void isobuilder::DirTree::setbasicsxa() {
have_xa = true;
if (dir)
@@ -456,6 +461,9 @@ int isobuilder::putfile(Handle * file, int mode, int n) {
size_t filesize;
int fsect;
+ if (mode < 0)
+ mode = dmode;
+
if (n >= 0) {
sector = n;
} else {
@@ -607,12 +615,14 @@ isobuilder::DirTree * isobuilder::createdir(DirTree * p, const String & _name, i
r = new DirTree(p);
- r->name = _name;
r->creation = p->creation;
- r->fromdir(d);
+ if (d)
+ r->fromdir(d);
if (_name != "")
r->name = _name;
r->size = size * 2048;
+ if (!r->size)
+ r->size = d->Size;
r->sector = lastdispsect;
if (mode >= 0)
r->mode = mode;
@@ -651,7 +661,7 @@ isobuilder::DirTree * isobuilder::createfile(DirTree * p, Handle * file, const S
r->mode = dmode;
}
-void isobuilder::copydir(isobuilder::DirTree * r, const String & _name, cdutils * cd, cdutils::DirEntry * d, int mode) {
+void isobuilder::copydir(isobuilder::DirTree * r, cdutils * cd, cdutils::DirEntry * d, int mode) {
Byte datas[2048];
cdutils::DirEntry * p;
int nsectors = d->Size / 2048, ssize, c = 0;
@@ -660,10 +670,6 @@ void isobuilder::copydir(isobuilder::DirTree * r, const String & _name, cdutils
if (mode < 0)
mode = dmode;
- r->fromdir(d);
- if (_name != "")
- r->name = _name;
-
while (nsectors) {
cd->read_sector(datas, mode, d->Sector + c++);
nsectors--;
@@ -676,7 +682,7 @@ void isobuilder::copydir(isobuilder::DirTree * r, const String & _name, cdutils
pbuf[p->N] = 0;
if (p->Flags & 2) {
if (!((p->N == 1) && ((p->id[0] == 0) || (p->id[0] == 1))))
- copydir(createdir(r, "", p->Size / 2048, p, mode), "", cd, p, mode);
+ copydir(createdir(r, "", p->Size / 2048, p, mode), cd, p, mode);
} else {
printm(M_INFO, "Dupping %s\n", pbuf);
int fmode;