Applying a patch using Kompare

I need a little help to apply a patch using Kompare. The patch is a diff file that applies to a tree a/program/… and should store the result in b/program/…
When I open the diff file from the same directory where variant a is located, I can apply the changes, but when I try to save the error message

The temporary file can not be uploaded. The temporary file is still available at /tmp/kompare.wZ3508. You can copy it manually to the right location.

this happens for each hunk in the diff file. Same error appears if I create variant b, same content as a, and try to apply the change.
Any idea how to get this running (and not using patch-command)?

Hmm, I’ve never used “Kompare”. I didn’t know there was such a command. But I see that it is installed, and tried it. And I still am no wiser.

For applying patches, I normally use “patch” perhaps followed by “vi” (to fix problems).

Ummm, no it should apply the patch to the source your patching…

So, the a is the source the b is the modifications, the patch is the diff between the two. So a and b are the work folders, if that make sense?

You would use the unpatched source and apply the patch to this…

My workflow goes like this (if not using git);

Create a work directory and copy the source file and extract this source file, rename the directory as a, extract the source again and rename to b

     - a
     - b

Make my changes to files in folder b, then do a diff

cd work
diff -Naur a b > some.patch

Now if I extract the source files again and cd into that directory let’s call it orig_source (which is the same as directory a, but that’s our working directory, so don’t want to taint);

cd work/orig_source
cp ../some.patch .
patch -p1 < some.patch

Now on OBS in a spec file in %prep section, this would be;

%patch0 -p1

Thanks Neil and Malcolm, that was exactly the way I did it. Finally I applied the patch manually as you described as well.
I think I will open a bug for compare, lets see what the author says