Projects / DiscDB

DiscDB

DiscDB is a little program that will use MySQL to catalog all files on your CDs, making it easy to find a file without having to switch discs until you find it. It is intended to be useful for people who save all their downloads to CD-Rs.

Tags
Licenses
Operating Systems
Implementation

RSS Recent releases

  •  15 Aug 2001 11:31

Release Notes: Added link counts feature to track unused directories. Optimize will also rebuild link counts, and delete unused directories, and the directory search will now skip /rr_moved dir if it exists. Fixed time retrieval, which now works perfectly, and fixed a bug in delete procedure - works ok now. Entry is now indexed, to make linkcounts easier to keep, and to make sure empty directories are indexed.

RSS Recent comments

12 Jul 2003 07:16 ngon

Patch for hang on add
This is a good little program. If any users out there encounter a hang when adding a CD, try using the patch below. I've tried e-mailing the author a couple times to no avail.

--- add.cc.orig 2001-01-22 00:45:13.000000000 -0500
+++ add.cc 2003-07-06 14:55:03.000000000 -0400
@@ -14,6 +14,7 @@
#include <sys/sysmacros.h>
#include <unistd.h>
#include <errno.h>
+#include <stdio.h>
#include <readline/readline.h>
#include <time.h>
#include "discdb.h"
@@ -296,8 +297,6 @@

do_scan("", basedir, 1);

- (void) closedir(discDIR);
-
query.reset();
query << "UPDATE discs";
query << " SET";
@@ -306,8 +305,15 @@
query << " dirs = " << dircount;
query << " WHERE discid = " << discID << ";";
query.execute(RESET_QUERY);
+ if (!query.success()) {
+ cerr << "Error updating database: "<< query.error() << endl;
+ }

cout << endl << filecount << " files totalling " << totalbytes << " bytes and " << dircount << " directories were indexed into the database." << endl;
- cout << endl << "Done. " << endl;
+ cout << "Done. " << endl;
+
+ // Moved this line here; previously before query.reset() and would cause hang.
+ (void) closedir(discDIR);
+
return 0;
}

Screenshot

Project Spotlight

groonga

An full text search engine and column store..

Screenshot

Project Spotlight

The friendly interactive shell

A shell focused on interactive use, discoverability, and user friendliness.