Index: util/lar/lar.c
===================================================================
--- util/lar/lar.c	(revision 620)
+++ util/lar/lar.c	(working copy)
@@ -130,8 +130,9 @@
 	}
 
 	for( ; files; files = files->next) {
-		if (lar_add_file(lar, files->name)) {
-			fprintf(stderr, "Error adding %s to the LAR.\n", files->name);
+		if (lar_add_file(lar, files)) {
+			fprintf(stderr, "Error adding %s:%s (%d) to the LAR.\n",
+				 files->name, files->pathname, files->algo);
 			lar_close_archive(lar);
 			exit(1);
 		}
@@ -157,8 +158,9 @@
 	}
 
 	for( ; files; files = files->next) {
-		if (lar_add_file(lar, files->name)) {
-			fprintf(stderr, "Error adding %s to the LAR.\n", files->name);
+		if (lar_add_file(lar, files)) {
+			fprintf(stderr, "Error adding %s:%s (%d) to the LAR.\n",
+				 files->name, files->pathname, files->algo);
 			lar_close_archive(lar);
 			exit(1);
 		}
@@ -377,7 +379,7 @@
 
 	while (optind < argc) {
 		if (larmode == CREATE || larmode == ADD) {
-			add_files(argv[optind++]);
+			add_files(argv[optind++], NULL, algo);
 		} else
 			add_file_or_directory(argv[optind++]);
 	}
Index: util/lar/lib.c
===================================================================
--- util/lar/lib.c	(revision 620)
+++ util/lar/lib.c	(working copy)
@@ -181,7 +181,8 @@
 	return ret;
 }
 
-static int handle_directory(const char *name)
+static int handle_directory(const char *name, const char *pathname, 
+				const enum compalgo thisalgo)
 {
 	int n;
 	int ret = -1;
@@ -194,6 +195,7 @@
 	} else {
 		while (n--) {
 			char fullname[MAX_PATH];
+			char fullpathname[MAX_PATH];
 
 			fullname[0] = '\0';
 
@@ -201,15 +203,23 @@
 			    strncmp(".", namelist[n]->d_name, 2)) {
 
 				strncpy(fullname, name, MAX_PATH);
+				strncpy(fullpathname, pathname, MAX_PATH);
 
 				if (name[(strlen(name)) - 1] != '/') {
 					strncat(fullname, "/", MAX_PATH);
 				}
 
+				if (name[(strlen(pathname)) - 1] != '/') {
+					strncat(fullpathname, "/", MAX_PATH);
+				}
+
 				strncat(fullname, namelist[n]->d_name,
 					MAX_PATH);
 
-				add_files(fullname);
+				strncat(fullpathname, namelist[n]->d_name,
+					MAX_PATH);
+
+				add_files(fullname,fullpathname,thisalgo);
 			}
 			free(namelist[n]);
 
@@ -226,73 +236,82 @@
  * This function is used when an archive is created or added to.
  */
 
-int add_files(const char *name)
+int add_files(const char *name, const char * pathname_in, 
+		const enum compalgo algo_in)
 {
 	struct stat filestat;
 	int ret = -1;
-	char *realname;
+	char *filename;
+	char *pathname;
+	enum compalgo thisalgo = algo_in;
 	char *c;
 
-	if (strstr(name, "nocompress:") == name) {
-		realname = strdup(name + 11);
-	} else {
-		realname = strdup(name);
+	if (pathname_in == NULL) {
+		ret = lar_process_name((char*)name, &filename, &pathname, &thisalgo);
+		if (ret != 0)
+			return ret;
 	}
-
-	if (realname == NULL) {
-	  fprintf(stderr, "Out of memory.\n");
-	  exit(1);
+	else {
+		filename = (char*)name;
+		pathname = (char*)pathname_in;
+		thisalgo = algo_in;
 	}
-
-	/* printf("... add_files %s\n", name); */
-	if (stat(realname, &filestat) == -1) {
-		fprintf(stderr, "Error getting file attributes of %s\n", name);
-		free(realname);
+	
+	/*printf("%s: %s (%s:%s)\n",__FUNCTION__,name,filename,pathname);*/
+	if (stat(filename, &filestat) == -1) {
+		fprintf(stderr, "Error getting file attributes of %s\n", filename);
 		return -1;
 	}
 
 	if (S_ISCHR(filestat.st_mode) || S_ISBLK(filestat.st_mode)) {
-		fprintf(stderr, "Device files are not supported: %s\n", name);
+		fprintf(stderr, "Device files are not supported: %s\n", filename);
 	}
 
 	if (S_ISFIFO(filestat.st_mode)) {
-		fprintf(stderr, "FIFOs are not supported: %s\n", name);
+		fprintf(stderr, "FIFOs are not supported: %s\n", filename);
 	}
 
 	if (S_ISSOCK(filestat.st_mode)) {
-		fprintf(stderr, "Sockets are not supported: %s\n", name);
+		fprintf(stderr, "Sockets are not supported: %s\n", filename);
 	}
 
 	if (S_ISLNK(filestat.st_mode)) {
-		fprintf(stderr, "Symbolic links are not supported: %s\n", name);
+		fprintf(stderr, "Symbolic links are not supported: %s\n", filename);
 	}
 	// Is it a directory?
 	if (S_ISDIR(filestat.st_mode)) {
-		ret = handle_directory(realname);
+		ret = handle_directory(filename,pathname,thisalgo);
 	}
 	// Is it a regular file?
 	if (S_ISREG(filestat.st_mode)) {
 		struct file *tmpfile;
 
-		/* printf("... adding %s\n", name); */
+		/* printf("... adding %s\n", filename); */
 		tmpfile = malloc(sizeof(struct file));
 		if (!tmpfile) {
 			fprintf(stderr, "Out of memory.\n");
 			exit(1);
 		}
 
-		tmpfile->name = strdup(name);
+		tmpfile->name = strdup(filename);
 		if (!tmpfile->name) {
 			fprintf(stderr, "Out of memory.\n");
 			exit(1);
 		}
 
+		tmpfile->pathname = strdup(pathname);
+		if (!tmpfile->pathname) {
+			fprintf(stderr, "Out of memory.\n");
+			exit(1);
+		}
+		
+		tmpfile->algo = thisalgo;
+
 		tmpfile->next = files;
 		files = tmpfile;
 		ret = 0;
 	}
 
-	free(realname);
 	return ret;
 }
 
@@ -318,6 +337,8 @@
 	}
 
 	tmpfile->next = files;
+	tmpfile->pathname = NULL;
+	tmpfile->algo = ALGO_INVALID;
 	files = tmpfile;
 
 	return 0;
@@ -336,6 +357,8 @@
 		temp = files;
 		files = files->next;
 		free(temp->name);
+		if (temp->pathname!=NULL)
+			free(temp->pathname);
 		free(temp);
 	}
 }
@@ -347,7 +370,10 @@
 
 	printf("File list:\n");
 	while (walk) {
-		printf("- %s\n", walk->name);
+		if (temp->pathname==NULL)
+			printf("- %s\n", walk->name);
+		else
+			printf("- %s:%s\n", walk->name, walk->pathname);
 		walk = walk->next;
 	}
 	printf("-----\n");
Index: util/lar/lib.h
===================================================================
--- util/lar/lib.h	(revision 620)
+++ util/lar/lib.h	(working copy)
@@ -25,6 +25,8 @@
 
 struct file {
 	char *name;
+	char *pathname;
+	enum compalgo algo;
 	struct file *next;
 };
 
@@ -46,7 +48,8 @@
 /* prototypes for lib.c functions */
 int mkdirp_below(const char *parent, const char *dirpath, mode_t mode);
 
-int add_files(const char *name);
+int add_files(const char *name, const char *pathname_in,
+		const enum compalgo algo_in);
 int add_file_or_directory(const char *name);
 
 struct file *get_files(void);
@@ -71,7 +74,7 @@
 void lar_close_archive(struct lar *lar);
 
 void lar_list_files(struct lar *lar, struct file *files);
-int lar_add_file(struct lar *lar, char *name);
+int lar_add_file(struct lar *lar, struct file* file);
 int lar_add_bootblock(struct lar *lar, const char *bootblock);
 int lar_extract_files(struct lar *lar, struct file *files);
 
Index: util/lar/stream.c
===================================================================
--- util/lar/stream.c	(revision 620)
+++ util/lar/stream.c	(working copy)
@@ -929,28 +929,22 @@
  * @param name The name of the file to add
  * @return  0 on success, or -1 on failure
  */
-int lar_add_file(struct lar *lar, char *name)
+int lar_add_file(struct lar *lar, struct file* file)
 {
-	char *filename, *ptr, *temp;
-	char *pathname;
+	char *ptr, *temp;
 
-	enum compalgo thisalgo;
 	struct lar_header *header;
 	int ret, hlen;
 	u32 complen;
-	int pathlen;
 	u32 size;
 
-	thisalgo = algo;
-	lar_process_name(name, &filename, &pathname, &thisalgo);
+	ptr = mapfile(file->name, &size);
 
-	ptr = mapfile(filename, &size);
-
 	if (ptr == MAP_FAILED)
 		return -1;
 
 	if (elfparse() && iself(ptr)) {
-		output_elf_segments(lar, pathname, ptr, size, thisalgo);
+		output_elf_segments(lar, file->pathname, ptr, size, file->algo);
 		return 0;
 	}
 
@@ -969,11 +963,11 @@
 		return -1;
 	}
 
-	complen = lar_compress(ptr, size, temp, &thisalgo);
+	complen = lar_compress(ptr, size, temp, &file->algo);
 
 	munmap(ptr, size);
 
-	ret = lar_add_entry(lar, pathname, temp, complen, size, 0, 0, thisalgo);
+	ret = lar_add_entry(lar, file->pathname, temp, complen, size, 0, 0, file->algo);
 
 	free(temp);
 	return ret;
