summaryrefslogtreecommitdiff
path: root/src/file.cc
diff options
context:
space:
mode:
authordeva <deva>2005-06-14 12:29:40 +0000
committerdeva <deva>2005-06-14 12:29:40 +0000
commit430524810e67d3c223a2ab819f45b882b419c45d (patch)
tree0abb4b2dd3dabc414c755c30e52d0b5022ee8670 /src/file.cc
parent0836a6e06f86e366017da3b2b2c132b3a4f2c877 (diff)
Incorporated the use of the Info object everywhere... also using the log functionality.
Diffstat (limited to 'src/file.cc')
-rw-r--r--src/file.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/file.cc b/src/file.cc
index 1a94150..813a041 100644
--- a/src/file.cc
+++ b/src/file.cc
@@ -31,6 +31,9 @@
/*
* $Log$
+ * Revision 1.3 2005/06/14 12:29:40 deva
+ * Incorporated the use of the Info object everywhere... also using the log functionality.
+ *
* Revision 1.2 2005/06/13 20:38:19 deva
* Added some logfile code.
* Enhanced the file object... now ready to hook into mov_encoder
@@ -120,7 +123,7 @@ int File::Open()
seqnum ++;
- info->log("Opened the file %s for output.\n", fname);
+ info->log("Opened the file %s for output.", fname);
return 0;
}
@@ -137,7 +140,7 @@ int File::Write(void* data, int size)
w = write(fd, data, size);
if(w != size) {
info->error("Out of diskspace!\n");
- exit(1);
+ return -1;
}
}
@@ -155,13 +158,14 @@ int File::createPath(char* path)
subpath[strrchr(subpath, '/') - subpath] = '\0';
- printf("%s\n", path);
+ info->info("Checking and/or generating directory: %s", path);
if(strlen(subpath) > 0) createPath(subpath);
// stat(path, &stats);
//if(!S_ISDIR(stats.st_mode) && S_ISREG(stats.st_mode))
mkdir(path, S_IRWXU | S_IRGRP | S_IXGRP | S_IXOTH | S_IROTH);
+ // TODO: Check for creation errors!
free(subpath);