bug-patch
[Top][All Lists]
Advanced

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

[bug-patch] patch fails to create directories when calculating TMP*NAME


From: Ozan Çağlayan
Subject: [bug-patch] patch fails to create directories when calculating TMP*NAME
Date: Fri, 26 Nov 2010 10:01:51 +0200
User-agent: KMail/1.13.5 (Linux/2.6.31.13-131-pae; KDE/4.4.5; i686; ; )

Hi,

the following commit:

commit fdafb60cc0d920fe3f31965013235fbd7fc9d592
Author: Andreas Gruenbacher <address@hidden>
Date:   Thu Sep 16 13:25:32 2010 +0200

    Stop using mktemp() for TMPOUTNAME
    
    * src/patch.c (main): Compute TMPOUTNAME with make_tempfile().
    (make_temp): Remove obsolete function.

breaks patch in a way that it no longer creates sub directories when creating 
temporary files, e.g.:

--- /dev/null
+++ newdirectory/newfile
@@ -0,0 +1,2 @@
+one
+two

applying the above patch with:

patch -p0 < above.diff

fails if newdirectory doesn't exist:

**** Can't create temporary file newdirectory/newfile.oMoM0mE: No such file or 
directory

I'm attaching a patch which adds a unit-test for this case.

Thanks,

---
Ozan Çağlayan
TUBITAK/UEKAE - Pardus Linux
http://www.pardus.org.tr/eng

Attachment: add-directory-test.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]