From 307813a8328fd820e743f0afba52424a9f9b12b2 Mon Sep 17 00:00:00 2001 From: Martin Renold Date: Tue, 7 Feb 2012 22:58:23 +0100 Subject: [PATCH] plug-ins: openraster should not use layer label as filename If the label contains an URL, the double slashes (//) make very poor filenames inside the ZIP container. http://forum.intilinux.com/mypaint-help-and-tips/gimp-corrupting-ora-files/msg10284/#msg10284 --- plug-ins/pygimp/plug-ins/file-openraster.py | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plug-ins/pygimp/plug-ins/file-openraster.py b/plug-ins/pygimp/plug-ins/file-openraster.py index 14f378a..4cdc909 100755 --- a/plug-ins/pygimp/plug-ins/file-openraster.py +++ b/plug-ins/pygimp/plug-ins/file-openraster.py @@ -129,10 +129,10 @@ def save_ora(img, drawable, filename, raw_filename): return layer # save layers - for lay in img.layers: + for i, lay in enumerate(img.layers): x, y = lay.offsets opac = lay.opacity / 100.0 # needs to be between 0.0 and 1.0 - add_layer(x, y, opac, lay, 'data/%s.png' % lay.name.decode('utf-8'), lay.visible) + add_layer(x, y, opac, lay, 'data/%03d.png' % i, lay.visible) # save thumbnail w, h = img.width, img.height -- 1.7.8.rc3