1 |
pva 07/09/29 07:26:13 |
2 |
|
3 |
Added: unix2dos-2.2-workaround-rename-EXDEV.patch |
4 |
digest-unix2dos-2.2-r1 |
5 |
Log: |
6 |
Fixes rename() fails with errno = EXDEV reported by Doan Vu <chronic.tautologist AT gmail.com> bug #131313. |
7 |
(Portage version: 2.1.3.10) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/unix2dos/files/unix2dos-2.2-workaround-rename-EXDEV.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: unix2dos-2.2-workaround-rename-EXDEV.patch |
16 |
=================================================================== |
17 |
--- ./unix2dos.c.orig 2007-09-29 11:13:16.000000000 +0400 |
18 |
+++ ./unix2dos.c 2007-09-29 11:15:22.000000000 +0400 |
19 |
@@ -204,7 +204,7 @@ |
20 |
int RetVal = 0; |
21 |
FILE *InF = NULL; |
22 |
FILE *TempF = NULL; |
23 |
- char TempPath[16]; |
24 |
+ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14); |
25 |
struct stat StatBuf; |
26 |
struct utimbuf UTimeBuf; |
27 |
int fd; |
28 |
@@ -213,7 +213,8 @@ |
29 |
if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) |
30 |
RetVal = -1; |
31 |
|
32 |
- strcpy (TempPath, "./u2dtmpXXXXXX"); |
33 |
+ strcpy (TempPath, ipInFN); |
34 |
+ strcat (TempPath, "_u2dtmpXXXXXX"); |
35 |
if((fd=mkstemp (TempPath)) < 0) { |
36 |
perror("Can't open output temp file"); |
37 |
RetVal = -1; |
38 |
@@ -276,6 +277,7 @@ |
39 |
} |
40 |
} |
41 |
|
42 |
+ free (TempPath); |
43 |
return RetVal; |
44 |
} |
45 |
|
46 |
@@ -289,7 +291,7 @@ |
47 |
int RetVal = 0; |
48 |
FILE *InF = NULL; |
49 |
FILE *TempF = NULL; |
50 |
- char TempPath[16]; |
51 |
+ char *TempPath = (char *) malloc(sizeof(char) * strlen(ipInFN)+14); |
52 |
struct stat StatBuf; |
53 |
struct utimbuf UTimeBuf; |
54 |
int fd; |
55 |
@@ -298,7 +300,8 @@ |
56 |
if ((ipFlag->KeepDate) && stat(ipInFN, &StatBuf)) |
57 |
RetVal = -1; |
58 |
|
59 |
- strcpy (TempPath, "./u2dtmpXXXXXX"); |
60 |
+ strcpy (TempPath, ipInFN); |
61 |
+ strcat (TempPath, "_u2dtmpXXXXXX"); |
62 |
if((fd=mkstemp (TempPath)) < 0) { |
63 |
perror("Can't open output temp file"); |
64 |
RetVal = -1; |
65 |
@@ -361,6 +364,8 @@ |
66 |
} |
67 |
RetVal = -1; |
68 |
} |
69 |
+ |
70 |
+ free (TempPath); |
71 |
return RetVal; |
72 |
} |
73 |
|
74 |
|
75 |
|
76 |
|
77 |
1.1 app-text/unix2dos/files/digest-unix2dos-2.2-r1 |
78 |
|
79 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/unix2dos/files/digest-unix2dos-2.2-r1?rev=1.1&view=markup |
80 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-text/unix2dos/files/digest-unix2dos-2.2-r1?rev=1.1&content-type=text/plain |
81 |
|
82 |
Index: digest-unix2dos-2.2-r1 |
83 |
=================================================================== |
84 |
MD5 e4488c241fa9067a48a7534a21d4babb unix2dos-2.2.src.tar.gz 5898 |
85 |
RMD160 7a06b892859d6ac22ae7add2ff2aa2017dbb5a2d unix2dos-2.2.src.tar.gz 5898 |
86 |
SHA256 e23d4fc9806b12bc04065123729b95c24b1f3ed48609019ab754b5934559f9aa unix2dos-2.2.src.tar.gz 5898 |
87 |
|
88 |
|
89 |
|
90 |
-- |
91 |
gentoo-commits@g.o mailing list |