|
Lines 21-29
Link Here
|
| 21 |
this isn't portable. We can probably get away with comparing ctime |
21 |
this isn't portable. We can probably get away with comparing ctime |
| 22 |
since we don't support hard links. |
22 |
since we don't support hard links. |
| 23 |
|
23 |
|
| 24 |
--- CPP/7zip/UI/Agent/Agent.cpp |
24 |
--- CPP/7zip/UI/Agent/Agent.cpp.orig 2015-09-17 19:02:35 UTC |
| 25 |
+++ CPP/7zip/UI/Agent/Agent.cpp |
25 |
+++ CPP/7zip/UI/Agent/Agent.cpp |
| 26 |
@@ -1215,7 +1215,7 @@ STDMETHODIMP CAgentFolder::Extract(const |
26 |
@@ -1515,7 +1515,7 @@ STDMETHODIMP CAgentFolder::Extract(const |
| 27 |
HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(), |
27 |
HRESULT result = _agentSpec->GetArchive()->Extract(&realIndices.Front(), |
| 28 |
realIndices.Size(), testMode, extractCallback); |
28 |
realIndices.Size(), testMode, extractCallback); |
| 29 |
if (result == S_OK) |
29 |
if (result == S_OK) |
|
Lines 32-40
Link Here
|
| 32 |
return result; |
32 |
return result; |
| 33 |
COM_TRY_END |
33 |
COM_TRY_END |
| 34 |
} |
34 |
} |
| 35 |
--- CPP/7zip/UI/Client7z/Client7z.cpp |
35 |
--- CPP/7zip/UI/Client7z/Client7z.cpp.orig 2015-10-17 14:52:30 UTC |
| 36 |
+++ CPP/7zip/UI/Client7z/Client7z.cpp |
36 |
+++ CPP/7zip/UI/Client7z/Client7z.cpp |
| 37 |
@@ -222,8 +222,11 @@ private: |
37 |
@@ -230,8 +230,11 @@ private: |
| 38 |
COutFileStream *_outFileStreamSpec; |
38 |
COutFileStream *_outFileStreamSpec; |
| 39 |
CMyComPtr<ISequentialOutStream> _outFileStream; |
39 |
CMyComPtr<ISequentialOutStream> _outFileStream; |
| 40 |
|
40 |
|
|
Lines 46-52
Link Here
|
| 46 |
|
46 |
|
| 47 |
UInt64 NumErrors; |
47 |
UInt64 NumErrors; |
| 48 |
bool PasswordIsDefined; |
48 |
bool PasswordIsDefined; |
| 49 |
@@ -441,11 +444,23 @@ STDMETHODIMP CArchiveExtractCallback::Se |
49 |
@@ -449,11 +452,23 @@ STDMETHODIMP CArchiveExtractCallback::Se |
| 50 |
} |
50 |
} |
| 51 |
_outFileStream.Release(); |
51 |
_outFileStream.Release(); |
| 52 |
if (_extractMode && _processedFileInfo.AttribDefined) |
52 |
if (_extractMode && _processedFileInfo.AttribDefined) |
|
Lines 71-77
Link Here
|
| 71 |
|
71 |
|
| 72 |
STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password) |
72 |
STDMETHODIMP CArchiveExtractCallback::CryptoGetTextPassword(BSTR *password) |
| 73 |
{ |
73 |
{ |
| 74 |
@@ -912,6 +927,8 @@ int MY_CDECL main(int numArgs, const cha |
74 |
@@ -914,6 +929,8 @@ int MY_CDECL main(int numArgs, const cha |
| 75 |
// extractCallbackSpec->PasswordIsDefined = true; |
75 |
// extractCallbackSpec->PasswordIsDefined = true; |
| 76 |
// extractCallbackSpec->Password = L"1"; |
76 |
// extractCallbackSpec->Password = L"1"; |
| 77 |
HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback); |
77 |
HRESULT result = archive->Extract(NULL, (UInt32)(Int32)(-1), false, extractCallback); |
|
Lines 80-97
Link Here
|
| 80 |
if (result != S_OK) |
80 |
if (result != S_OK) |
| 81 |
{ |
81 |
{ |
| 82 |
PrintError("Extract Error"); |
82 |
PrintError("Extract Error"); |
| 83 |
--- CPP/7zip/UI/Common/ArchiveExtractCallback.cpp |
83 |
--- CPP/7zip/UI/Common/ArchiveExtractCallback.cpp.orig 2015-10-03 08:49:15 UTC |
| 84 |
+++ CPP/7zip/UI/Common/ArchiveExtractCallback.cpp |
84 |
+++ CPP/7zip/UI/Common/ArchiveExtractCallback.cpp |
| 85 |
@@ -1083,7 +1083,7 @@ STDMETHODIMP CArchiveExtractCallback::Se |
85 |
@@ -1502,7 +1502,7 @@ STDMETHODIMP CArchiveExtractCallback::Se |
| 86 |
NumFiles++; |
86 |
NumFiles++; |
| 87 |
|
87 |
|
| 88 |
if (_extractMode && _fi.AttribDefined) |
88 |
if (!_stdOutMode && _extractMode && _fi.AttribDefined) |
| 89 |
- SetFileAttrib(_diskFilePath, _fi.Attrib); |
89 |
- SetFileAttrib(_diskFilePath, _fi.Attrib); |
| 90 |
+ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks); |
90 |
+ SetFileAttrib(_diskFilePath, _fi.Attrib, &_delayedSymLinks); |
| 91 |
RINOK(_extractCallback2->SetOperationResult(operationResult, _encrypted)); |
91 |
|
| 92 |
return S_OK; |
92 |
RINOK(_extractCallback2->SetOperationResult(opRes, BoolToInt(_encrypted))); |
| 93 |
COM_TRY_END |
93 |
|
| 94 |
@@ -1149,8 +1149,9 @@ static int GetNumSlashes(const FChar *s) |
94 |
@@ -1584,8 +1584,9 @@ static unsigned GetNumSlashes(const FCha |
| 95 |
} |
95 |
} |
| 96 |
} |
96 |
} |
| 97 |
|
97 |
|
|
Lines 102-108
Link Here
|
| 102 |
CRecordVector<CExtrRefSortPair> pairs; |
102 |
CRecordVector<CExtrRefSortPair> pairs; |
| 103 |
pairs.ClearAndSetSize(_extractedFolderPaths.Size()); |
103 |
pairs.ClearAndSetSize(_extractedFolderPaths.Size()); |
| 104 |
unsigned i; |
104 |
unsigned i; |
| 105 |
@@ -1187,5 +1188,12 @@ HRESULT CArchiveExtractCallback::SetDirs |
105 |
@@ -1622,5 +1623,12 @@ HRESULT CArchiveExtractCallback::SetDirs |
| 106 |
(WriteATime && ATimeDefined) ? &ATime : NULL, |
106 |
(WriteATime && ATimeDefined) ? &ATime : NULL, |
| 107 |
(WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL)); |
107 |
(WriteMTime && MTimeDefined) ? &MTime : (_arc->MTimeDefined ? &_arc->MTime : NULL)); |
| 108 |
} |
108 |
} |
|
Lines 116-122
Link Here
|
| 116 |
+ |
116 |
+ |
| 117 |
+ return result; |
117 |
+ return result; |
| 118 |
} |
118 |
} |
| 119 |
--- CPP/7zip/UI/Common/ArchiveExtractCallback.h |
119 |
--- CPP/7zip/UI/Common/ArchiveExtractCallback.h.orig 2015-10-03 10:29:09 UTC |
| 120 |
+++ CPP/7zip/UI/Common/ArchiveExtractCallback.h |
120 |
+++ CPP/7zip/UI/Common/ArchiveExtractCallback.h |
| 121 |
@@ -6,6 +6,8 @@ |
121 |
@@ -6,6 +6,8 @@ |
| 122 |
#include "../../../Common/MyCom.h" |
122 |
#include "../../../Common/MyCom.h" |
|
Lines 127-133
Link Here
|
| 127 |
#include "../../IPassword.h" |
127 |
#include "../../IPassword.h" |
| 128 |
|
128 |
|
| 129 |
#include "../../Common/FileStreams.h" |
129 |
#include "../../Common/FileStreams.h" |
| 130 |
@@ -213,6 +215,8 @@ class CArchiveExtractCallback: |
130 |
@@ -237,6 +239,8 @@ class CArchiveExtractCallback: |
| 131 |
bool _saclEnabled; |
131 |
bool _saclEnabled; |
| 132 |
#endif |
132 |
#endif |
| 133 |
|
133 |
|
|
Lines 136-153
Link Here
|
| 136 |
void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath); |
136 |
void CreateComplexDirectory(const UStringVector &dirPathParts, FString &fullPath); |
| 137 |
HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined); |
137 |
HRESULT GetTime(int index, PROPID propID, FILETIME &filetime, bool &filetimeIsDefined); |
| 138 |
HRESULT GetUnpackSize(); |
138 |
HRESULT GetUnpackSize(); |
| 139 |
@@ -293,7 +297,7 @@ public: |
139 |
@@ -330,7 +334,7 @@ public: |
| 140 |
_baseParentFolder = indexInArc; |
|
|
| 141 |
} |
140 |
} |
|
|
141 |
#endif |
| 142 |
|
142 |
|
| 143 |
- HRESULT SetDirsTimes(); |
143 |
- HRESULT SetDirsTimes(); |
| 144 |
+ HRESULT SetFinalAttribs(); |
144 |
+ HRESULT SetFinalAttribs(); |
| 145 |
}; |
145 |
}; |
| 146 |
|
146 |
|
| 147 |
#endif |
147 |
bool CensorNode_CheckPath(const NWildcard::CCensorNode &node, const CReadArcItem &item); |
| 148 |
--- CPP/7zip/UI/Common/Extract.cpp |
148 |
--- CPP/7zip/UI/Common/Extract.cpp.orig 2015-09-07 19:47:32 UTC |
| 149 |
+++ CPP/7zip/UI/Common/Extract.cpp |
149 |
+++ CPP/7zip/UI/Common/Extract.cpp |
| 150 |
@@ -170,7 +170,7 @@ static HRESULT DecompressArchive( |
150 |
@@ -207,7 +207,7 @@ static HRESULT DecompressArchive( |
| 151 |
else |
151 |
else |
| 152 |
result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs); |
152 |
result = archive->Extract(&realIndices.Front(), realIndices.Size(), testMode, ecs); |
| 153 |
if (result == S_OK && !options.StdInMode) |
153 |
if (result == S_OK && !options.StdInMode) |
|
Lines 156-164
Link Here
|
| 156 |
return callback->ExtractResult(result); |
156 |
return callback->ExtractResult(result); |
| 157 |
} |
157 |
} |
| 158 |
|
158 |
|
| 159 |
--- CPP/Windows/FileDir.cpp |
159 |
--- CPP/Windows/FileDir.cpp.orig 2015-10-10 12:37:41 UTC |
| 160 |
+++ CPP/Windows/FileDir.cpp |
160 |
+++ CPP/Windows/FileDir.cpp |
| 161 |
@@ -343,7 +343,8 @@ static int convert_to_symlink(const char |
161 |
@@ -347,7 +347,8 @@ static int convert_to_symlink(const char |
| 162 |
return -1; |
162 |
return -1; |
| 163 |
} |
163 |
} |
| 164 |
|
164 |
|
|
Lines 168-174
Link Here
|
| 168 |
{ |
168 |
{ |
| 169 |
if (!fileName) { |
169 |
if (!fileName) { |
| 170 |
SetLastError(ERROR_PATH_NOT_FOUND); |
170 |
SetLastError(ERROR_PATH_NOT_FOUND); |
| 171 |
@@ -375,7 +376,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD |
171 |
@@ -379,7 +380,9 @@ bool SetFileAttrib(CFSTR fileName, DWORD |
| 172 |
stat_info.st_mode = fileAttributes >> 16; |
172 |
stat_info.st_mode = fileAttributes >> 16; |
| 173 |
#ifdef ENV_HAVE_LSTAT |
173 |
#ifdef ENV_HAVE_LSTAT |
| 174 |
if (S_ISLNK(stat_info.st_mode)) { |
174 |
if (S_ISLNK(stat_info.st_mode)) { |
|
Lines 179-185
Link Here
|
| 179 |
TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes))) |
179 |
TRACEN((printf("SetFileAttrib(%s,%d) : false-3\n",(const char *)name,fileAttributes))) |
| 180 |
return false; |
180 |
return false; |
| 181 |
} |
181 |
} |
| 182 |
@@ -885,6 +888,43 @@ bool CTempDir::Remove() |
182 |
@@ -814,6 +817,43 @@ bool CTempDir::Remove() |
| 183 |
return !_mustBeDeleted; |
183 |
return !_mustBeDeleted; |
| 184 |
} |
184 |
} |
| 185 |
|
185 |
|
|
Lines 222-229
Link Here
|
| 222 |
+ |
222 |
+ |
| 223 |
}}} |
223 |
}}} |
| 224 |
|
224 |
|
| 225 |
|
225 |
#ifndef _SFX |
| 226 |
--- CPP/Windows/FileDir.h |
226 |
--- CPP/Windows/FileDir.h.orig 2015-06-19 10:52:06 UTC |
| 227 |
+++ CPP/Windows/FileDir.h |
227 |
+++ CPP/Windows/FileDir.h |
| 228 |
@@ -4,6 +4,7 @@ |
228 |
@@ -4,6 +4,7 @@ |
| 229 |
#define __WINDOWS_FILE_DIR_H |
229 |
#define __WINDOWS_FILE_DIR_H |
|
Lines 249-255
Link Here
|
| 249 |
bool MyMoveFile(CFSTR existFileName, CFSTR newFileName); |
249 |
bool MyMoveFile(CFSTR existFileName, CFSTR newFileName); |
| 250 |
|
250 |
|
| 251 |
#ifndef UNDER_CE |
251 |
#ifndef UNDER_CE |
| 252 |
@@ -69,6 +73,31 @@ public: |
252 |
@@ -76,6 +80,31 @@ public: |
| 253 |
bool Remove(); |
253 |
bool Remove(); |
| 254 |
}; |
254 |
}; |
| 255 |
|
255 |
|