*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <config.h>
#include "ev-document-thumbnails.h"
#include "ev-file-helpers.h"
+#ifdef G_OS_WIN32
+/* On windows g_spawn_command_line_sync reads stdout in O_BINARY mode, not in O_TEXT mode.
+ * As a consequence, newlines are in a platform dependent representation (\r\n). This
+ * might be considered a bug in glib.
+ */
+#define EV_EOL "\r\n"
+#else
+#define EV_EOL "\n"
+#endif
+
typedef enum
{
RARLABS,
{"%s -xOf" , "%s -tf %s" , NULL , NO_OFFSET}
};
-static void comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsIface *iface);
+static void comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface);
static GSList* get_supported_image_extensions (void);
static void get_page_size_area_prepared_cb (GdkPixbufLoader *loader,
}
/* FIXME: is this safe against filenames containing \n in the archive ? */
- cb_files = g_strsplit (std_out, "\n", 0);
+ cb_files = g_strsplit (std_out, EV_EOL, 0);
+
g_free (std_out);
if (!cb_files) {
}
static void
-comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsIface *iface)
+comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface)
{
iface->get_thumbnail = comics_document_thumbnails_get_thumbnail;
iface->get_dimensions = comics_document_thumbnails_get_dimensions;