[scribus] Fix for missing images when reloading a file

Erich Dollansky erich.lists at ovitrap.com
Sun Sep 30 16:38:57 UTC 2012


Hi,

On Sun, 30 Sep 2012 15:20:49 +0200
ale rimoldi <ale.comp_06 at xox.ch> wrote:

> what exactly is the problem you're fixing with your code?
> 
I inquired some time ago about this here and got the information that
the problem is already fixed in 1.5.x. Unfortunately, there are some
people like me who cannot run 1.5.x at the moment.

> it's about the name of a file containing a valid url?

It is this problem:

<MASTEROBJECT OwnPage="1" PTYPE="2" XPOS="596.06362992126" ......

PFILE="../../../../../../../usr/home/Projekte/ALO/Documents/Descriptions/Graphics/Library/ALO-NewBlue-2.eps"

.....
LAYER="0" BOOKMARK="0" NEXTITEM="-1" BACKITEM="-1">

The problem is very easy to spot. PFILE contains an impossible path
as /usr/home is already the root of the file system.

I was told that the problem is caused by links in the path.

I am not able to avoid links in the path as we use links all over the
place in our file systems.

> well, while i wouldn't suggest to anybody to use such names, if this
> is a problem, i think that it's a bug that should be fixed in scribus
> itself...

I highly agree with you here. After digging a bit in the scribus code,
I decided that I could fix the problem much faster this way. As there
is a fix in the coming version already included, there is no need for
fixing the code when my program does the job.

With other words: I simply needed the fix for my current work as fast
as possible.

Erich
> 
> have a nice day
> a.l.e
> 
> > Hi,
> > 
> > scribus 1.4.1 has the problem of not being able to load images with
> > a link in the path.
> > 
> > I made a very basic program which solves this problem. The program
> > fixes the paths in the sla files. You have to run it every time
> > after you have saved a file with scribus.
> > 
> > Usage:
> > 
> > FixPath FileName
> > 
> > FixPath creates a backup file before changing the original file.
> > 
> > The program is a real hack but it works for me. If it does not work
> > for you, send me your sla file and I will try to fix it. Of course,
> > if you find a fix, please publish the new source.
> > 
> > The files:
> > 
> > http://www.alogreentechnologies.com/scribus/build
> > http://www.alogreentechnologies.com/scribus/dev
> > http://www.alogreentechnologies.com/scribus/ed.def
> > http://www.alogreentechnologies.com/scribus/FixPath.cpp
> > http://www.alogreentechnologies.com/scribus/FixPath.make
> > http://www.alogreentechnologies.com/scribus/Globals.h
> > 
> > Remarks:
> > 
> > Set tab width to 3 for proper formatting.
> > 
> > You must create two directories in the place where you store these
> > file: Inter and Run. Inter and Run are used to store the object and
> > executables.
> > 
> > build
> > =====
> > 
> > Builds FixPath.
> > 
> > dev
> > ===
> > 
> > Sets up the development environment. Run before compiling.
> > 
> > You must adjust the paths according to your environment.
> > 
> > ed.def
> > ======
> > 
> > This file is included by FixPath.cpp. It contains many macros we
> > always use. 
> > 
> > FixPath.cpp
> > ===========
> > 
> > The source file. The source was tested on FreeBSD 10.0.
> > 
> > FixPath.make
> > ============
> > 
> > The make file. You can run it directly without using build.
> > 
> > Globals.h
> > =========
> > 
> > Some global definitions.
> > 
> > Please keep in mind the this is a real hack just done to get a
> > solution I needed. Keep always backups of the files this program
> > processes.
> > 
> > Erich
> > 
> > ___
> > Scribus Mailing List: scribus at lists.scribus.net
> > Edit your options or unsubscribe:
> > http://lists.scribus.net/mailman/listinfo/scribus
> > See also:
> > http://wiki.scribus.net
> > http://forums.scribus.net
> 
> 
> ___
> Scribus Mailing List: scribus at lists.scribus.net
> Edit your options or unsubscribe:
> http://lists.scribus.net/mailman/listinfo/scribus
> See also:
> http://wiki.scribus.net
> http://forums.scribus.net
> 




More information about the scribus mailing list