Index: src/pkg.c
===================================================================
--- src/pkg.c	(revision 59)
+++ src/pkg.c	(working copy)
@@ -114,7 +114,7 @@
  /*
  ** Once the installer has determened the 
  ** current version of the Dropline destkop whe download
- ** the dropline package file list and store it under ~/.dr_installer/packages_xxx
+ ** the dropline package file list and store it under ~/.dropline/packages_xxx
  ** (where xxx is the dropline version). This function reads this file and stores
  ** the package properys in a linked list (for noobs a data base). This list will
  ** be used to download the packages.
@@ -162,6 +162,7 @@
  bool dlg_read_versions (char **versions)
  {
   unsigned char tmp[1], buf [512];
+  char *t;
   FILE *fd;
   int c = 0, d = 0;
 
@@ -171,29 +172,17 @@
   {
      while (!feof(fd))
      {
-	if  ((fgets (tmp, 2, fd)))
+	/* read in one line (up to 511 characters + terminating null) */
+	if (fgets(buf, 512, fd) != NULL)
 	{
-	  if (tmp[0] != '\n')
-	  {
+	  /* look for a newline character and kill it */
+	  t = strchr(&buf, '\n');
+	  if (t) t[0] = 0;
 
-	        if (d >= sizeof (buf))
-	         return false;
-
-	        buf [d]   = tmp[0];
-	        buf [++d] = 0;
-		
-		
-	  } else 
-	  {
-	          versions [c]     = strdup (buf);
-		  c++;
-		
-                  clean (buf);
-		  d = 0;
-	  }
+	  /* copy string into version array and clean up */
+	  versions[c++] = strdup(buf);
+	  clean(buf);
 	}
-
-
      }
  
      versions [c] = NULL;
