Sophie

Sophie

distrib > * > 2008.0 > x86_64 > by-pkgid > a62fc3f0285cc2de0a054bc489e77163 > files > 7

migration-assistant-0.5.1-3mdv2008.0.src.rpm

--- migration-assistant/utils.c.winnt	2007-10-01 17:08:35.000000000 +0200
+++ migration-assistant/utils.c	2007-10-03 12:49:09.000000000 +0200
@@ -101,9 +101,13 @@ char* get_insensitive_path(const char* p
     return ret;
 }
 void initialize_registry_paths() {
+    initialize_software_registry_path();
+    initialize_user_registry_path();
+}
+void initialize_software_registry_path() {
     char* tmp;
+
     software_key_file = NULL;
-    user_key_file = NULL;
 
     asprintf(&tmp, "%s/WINDOWS/system32/config/software", from_location);
     software_key_file = get_insensitive_path(tmp);
@@ -118,6 +122,11 @@ void initialize_registry_paths() {
         }
         if(tmp) free(tmp);
     }
+}
+void initialize_user_registry_path() {
+    char* tmp;
+
+    user_key_file = NULL;
 
     asprintf(&tmp, "%s/%s/%s/%s", from_location,
     "Documents and Settings", from_user, "NTUSER.DAT");
--- migration-assistant/ma-search-users.c.winnt	2007-09-20 09:18:34.000000000 +0200
+++ migration-assistant/ma-search-users.c	2007-10-03 12:50:05.000000000 +0200
@@ -61,7 +61,10 @@ void search_windowsxp(const char* mountp
     char* profile = NULL;
     int mult = 0;
 
-    asprintf(&systemreg, "%s/WINDOWS/system32/config/software", mountpoint);
+    from_location = mountpoint;
+    initialize_software_registry_path();
+    systemreg = software_key_file;
+
     profilesdir = findkey(systemreg, "\\Microsoft\\Windows NT\\CurrentVersion"
         "\\ProfileList\\ProfilesDirectory");
     allusers = findkey(systemreg, "\\Microsoft\\Windows NT\\CurrentVersion"
--- migration-assistant/utils.h.winnt	2007-08-01 09:41:17.000000000 +0200
+++ migration-assistant/utils.h	2007-10-03 12:49:49.000000000 +0200
@@ -19,6 +19,8 @@ void set_gconf_key (const char*, const c
 void add_wallpaper (const char*);
 void makegconfdirs(const char *dir);
 void initialize_registry_paths();
+void initialize_software_registry_path();
+void initialize_user_registry_path();
 // struct target_t {
 //  const char* option;
 //  const char* name;