Index: extensions/Picasa2Piwigo/Picasa2Piwigo/StatusForm.cs
===================================================================
--- extensions/Picasa2Piwigo/Picasa2Piwigo/StatusForm.cs	(revision 21241)
+++ extensions/Picasa2Piwigo/Picasa2Piwigo/StatusForm.cs	(revision 26935)
@@ -616,11 +616,11 @@
 
             //if it's a video file then skip it
-            if (photofilename.IndexOf(".jpg", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".gif", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".png", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".tga", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".tif", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".tiff", StringComparison.OrdinalIgnoreCase) == -1 &&
-                  photofilename.IndexOf(".psd", StringComparison.OrdinalIgnoreCase) == -1)
+            if (photofilename.ToLower().IndexOf(".jpg", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".gif", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".png", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".tga", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".tif", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".tiff", StringComparison.OrdinalIgnoreCase) == -1 &&
+                  photofilename.ToLower().IndexOf(".psd", StringComparison.OrdinalIgnoreCase) == -1)
             {
                 return face_tag_list;
@@ -642,97 +642,119 @@
 
             inifile = null;
-            try
-            {
-                inifile = new System.IO.StreamReader(filepath + "\\.picasa.ini");
-            }
-            catch
-            {
-                if (face_tag_list.Length > 1)
-                {
-                    face_tag_list = face_tag_list.Substring(0, face_tag_list.Length - 1);
-                }
-                return face_tag_list;
-            }
+            if (File.Exists(filepath + "\\.picasa.ini"))
+            {
+                try
+                {
+                    inifile = new System.IO.StreamReader(filepath + "\\.picasa.ini");
+                }
+                catch
+                {
+                    if (face_tag_list.Length > 1)
+                    {
+                        face_tag_list = face_tag_list.Substring(0, face_tag_list.Length - 1);
+                    }
+                    return face_tag_list;
+                }
+            }
+            else if (File.Exists(filepath + "\\Picasa.ini"))
+            {
+                try
+                {
+                    inifile = new System.IO.StreamReader(filepath + "\\Picasa.ini");
+                }
+                catch
+                {
+                    if (face_tag_list.Length > 1)
+                    {
+                        face_tag_list = face_tag_list.Substring(0, face_tag_list.Length - 1);
+                    }
+                    return face_tag_list;
+                }
+            } 
+            
             k = 0;
             found_photo = false;
-            while ((inidata = inifile.ReadLine()) != null)
-            {
-                if (inidata.Length > 4)
-                {
-                    if (inidata.Substring(0, 1) == "[")
-                    {
-                        found_photo = false;
-                        k = inidata.IndexOf("]");
-                        if (k != -1)
+            if (inifile != null)
+            {
+                while ((inidata = inifile.ReadLine()) != null)
+                {
+                    if (inidata.Length > 4)
+                    {
+                        if (inidata.Substring(0, 1) == "[")
                         {
-                            photo_file_name = inidata.Substring(1, k - 1);
-                        }
-                        if (photo_file_name != photofilename)
-                        {
-                            continue;
-                        }
-
-                        if (photo_file_name.IndexOf(".jpg", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".gif", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".png", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".tga", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".tif", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".tiff", StringComparison.OrdinalIgnoreCase) != -1 ||
-                            photo_file_name.IndexOf(".psd", StringComparison.OrdinalIgnoreCase) != -1)
-                        {
-                            found_photo = true;
-                        }
-                    }
-                    else if (inidata.Substring(0, 6) == "faces=" && found_photo)
-                    {
-                        finished_faces = false;
-                        k = 0;
-                        do
-                        {
-                            k = inidata.IndexOf("),", k);
+                            found_photo = false;
+                            k = inidata.IndexOf("]");
                             if (k != -1)
                             {
-                                l = inidata.IndexOf(";", k);
-                                if (l == -1)
+                                photo_file_name = inidata.Substring(1, k - 1);
+                            }
+                            if (photo_file_name.ToUpper() != photofilename.ToUpper())
+                            {
+                                continue;
+                            }
+
+                            if (photo_file_name.ToLower().IndexOf(".jpg", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".gif", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".png", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".tga", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".tif", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".tiff", StringComparison.OrdinalIgnoreCase) != -1 ||
+                                photo_file_name.ToLower().IndexOf(".psd", StringComparison.OrdinalIgnoreCase) != -1)
+                            {
+                                found_photo = true;
+                            }
+                        }
+                        else if (inidata.Substring(0, 6) == "faces=" && found_photo)
+                        {
+                            finished_faces = false;
+                            k = 0;
+                            do
+                            {
+                                k = inidata.IndexOf("),", k);
+                                if (k != -1)
                                 {
-                                    l = inidata.Length;
-                                }
-                                if (l != -1)
-                                {
-                                    ini_unique_id = inidata.Substring(k + 2, l - k - 2);
-
-                                    //found face in a picture, but who?
-                                    l = 0;
-                                    found_person = false;
-                                    do
+                                    l = inidata.IndexOf(";", k);
+                                    if (l == -1)
                                     {
-                                        if (GlobalClass.picasa_unique_id_arrary[l].unique_id == ini_unique_id)
+                                        l = inidata.Length;
+                                    }
+                                    if (l != -1)
+                                    {
+                                        ini_unique_id = inidata.Substring(k + 2, l - k - 2);
+
+                                        //found face in a picture, but who?
+                                        l = 0;
+                                        found_person = false;
+                                        do
                                         {
-                                            //did we already find this person?
-                                            if (found_contact_in_photo_array[l] == false)
+                                            if (GlobalClass.picasa_unique_id_arrary[l].unique_id == ini_unique_id)
                                             {
-                                                found_person = true;
-                                                break;
+                                                //did we already find this person?
+                                                if (found_contact_in_photo_array[l] == false)
+                                                {
+                                                    found_person = true;
+                                                    break;
+                                                }
+                                            }
+                                            l++;
+                                        } while (l < GlobalClass.unique_id_count);
+
+                                        //found person
+                                        if (found_person)
+                                        {
+                                            if (photo_file_name.Length > 3)
+                                            {
+                                                face_tag_list += GlobalClass.contact_array[l].name + ",";
                                             }
                                         }
-                                        l++;
-                                    } while (l < GlobalClass.unique_id_count);
-
-                                    //found person
-                                    if (found_person)
-                                    {
-                                        if (photo_file_name.Length > 3)
-                                        {
-                                            face_tag_list += GlobalClass.contact_array[l].name + ",";
-                                        }
                                     }
+                                    k++;
                                 }
-                                k++;
-                            }
-                            else
-                            {
-                                finished_faces = true;
-                            }
-                        } while (!finished_faces);
+                                else
+                                {
+                                    finished_faces = true;
+                                }
+                            } while (!finished_faces);
+                        }
                     }
                 }
@@ -901,6 +923,16 @@
         {
             string WebResponse, WebRequest, xmlResponse;
-
-            WebRequest = FormSettings.Default.PiwigoUrlSetting + "/ws.php?method=pwg.categories.getList&fullname=\"true\"&recursive=\"false\"";
+            int piwigo_minor_version;
+
+            piwigo_minor_version = Convert.ToInt32(GlobalClass.PiwigoVersionNumber.Substring(2, 1));
+            if (piwigo_minor_version >= 6)
+            {
+                WebRequest = FormSettings.Default.PiwigoUrlSetting + "/ws.php?method=pwg.categories.getList&fullname=true&recursive=true";
+            }
+            else
+            {
+                WebRequest = FormSettings.Default.PiwigoUrlSetting + "/ws.php?method=pwg.categories.getList&fullname=\"true\"&recursive=\"false\"";
+            }
+
             WriteLog(WebRequest);
 
@@ -1409,5 +1441,5 @@
             string strLogFile;
 
-            strLogFile = "picasa2piwigo_log.txt";
+            strLogFile = "c:\\temp\\picasa2piwigo_log.txt";
 #pragma warning disable 0162
             if (constants.DEBUG_LOG_ENABLED)            
