From f56ffedfa2ae46e70d2ef3ac64585ce69edc7649 Mon Sep 17 00:00:00 2001 From: gardners Date: Mon, 9 Jan 2012 09:06:35 +1030 Subject: [PATCH] Made -r also set hlr.dat location. --- dna.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/dna.c b/dna.c index f3e28279..49da2062 100644 --- a/dna.c +++ b/dna.c @@ -327,6 +327,15 @@ int main(int argc,char **argv) if (rhizome_datastore_path) return WHY("-r specified more than once"); rhizome_datastore_path=optarg; rhizome_opendb(); + /* Also set hlr file to be in the Rhizome directory, to save the need to specify it + separately. */ + char temp[1024];temp[1023]=0; + snprintf(temp,1024,"%s/hlr.dat",optarg); + if (temp[1023]) { + exit(WHY("Rhizome directory name too long.")); + } + hlr_file=strdup(temp); + break; case 'M': /* Distribute specified manifest and file pair using Rhizome. */ /* This option assumes that the manifest is locally produced, and will