--- gnome-vfs-utils.c.r1.75	Wed Nov 26 14:18:38 2003
+++ gnome-vfs-utils.c	Thu Nov 27 02:57:10 2003
@@ -800,18 +800,21 @@
 	statfs_result = statfs (unescaped_path, &statfs_buffer);   
 #endif  
 
+	g_free (unescaped_path);
+
 	if (statfs_result != 0) {
-		g_free (unescaped_path);
 		return gnome_vfs_result_from_errno ();
 	}
 
+#if defined(__linux__)
 	/* ncpfs does not know the amount of available and free space */
 	if (statfs_buffer.f_bavail == 0 && statfs_buffer.f_bfree == 0) {
-#if defined(__linux__)
 		/* statvfs does not contain an f_type field, we try again
 		 * with statfs.
 		 */
 		struct statfs statfs_buffer2;
+
+		unescaped_path = gnome_vfs_unescape_string (path, G_DIR_SEPARATOR_S);
 		statfs_result = statfs (unescaped_path, &statfs_buffer2);
 		g_free (unescaped_path);
 
@@ -820,14 +823,11 @@
 		}
 		
 		/* linux/ncp_fs.h: NCP_SUPER_MAGIC == 0x564c */
-		if (statfs_buffer2.f_type == 0x564c)
-#elif defined(__sun)
-		if (strcmp(statfs_buffer.f_basetype, "ncpfs") == 0)
-#endif
-		{
+		if (statfs_buffer2.f_type == 0x564c) {
 			return GNOME_VFS_ERROR_NOT_SUPPORTED;
 		}
 	}
+#endif
 
 	block_size = statfs_buffer.f_bsize; 
 	free_blocks = statfs_buffer.f_bavail;
