--- sync.addressbook.groupdav.js	Do Dez  6 15:12:42 2012
+++ sync.addressbook.groupdav.js_new	Fr Jan 18 10:21:36 2013
@@ -523,18 +523,18 @@
             }
             let photoURL = oldCard.getProperty("PhotoURI", "");
             if (photoURL != "") {
-                /* warning: this might not work on windows, due to the accessing of files via uris */
                 if (urlIsInSOGoImageCache(photoURL)) {
-                    //for Windows: photoURL == file://absolute/path/to/some.jpg
-                    let parts = photoURL.split("/");
+                    //for Windows: photoURL == file://C:\Some\path\to\file
+                    var appInfo = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime);
+                    let parts;
+                    if (appInfo.OS == "WINNT"){
+                        parts = photoURL.split("\\");
+                    } else {
+                        parts = photoURL.split("/");
+                    }
                     let lastPart = parts[parts.length-1];
-                    if (lastPart != "") {
-                        //on Windows, this is a absolute path. We only need the filename.
-                        parts = lastPart.split("\\");
-                        if(parts.length > 1)
-                            lastPart = parts[parts.length-1];
+                    if (lastPart != "") 
                         deletePhotoFile(lastPart, true);
-                    }
                 }
                 oldCard.deleteProperty("PhotoURI");
             }
