[gimp/metadata-browser] Bug 669616 - openraster plugin saves invalid files under some circumstances



commit e2ea4462c2814c864cbb615e21581ef5e8dcf9ed
Author: Martin Renold <martinxyz gmx ch>
Date:   Tue Feb 7 22:58:23 2012 +0100

    Bug 669616 - openraster plugin saves invalid files under some circumstances
    
    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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]