You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.Formats.Tar/TarFile.xml
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -224,6 +224,7 @@
224
224
<summary>Extracts the contents of a stream that represents a tar archive into the specified directory.</summary>
225
225
<remarks>
226
226
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramrefname="destinationDirectoryName" />, an <seecref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
227
+
<para>If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
227
228
<para>Files of type <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <seecref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
228
229
<para>Elevation is required to extract a <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
229
230
</remarks>
@@ -275,6 +276,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
275
276
<summary>Extracts the contents of a tar file into the specified directory.</summary>
276
277
<remarks>
277
278
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramrefname="destinationDirectoryName" />, an <seecref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
279
+
<para>If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
278
280
<para>Files of type <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <seecref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
279
281
<para>Elevation is required to extract a <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
280
282
</remarks>
@@ -325,6 +327,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
325
327
<returns>A task that represents the asynchronous extraction operation.</returns>
326
328
<remarks>
327
329
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramrefname="destinationDirectoryName" />, an <seecref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
330
+
<para>If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
328
331
<para>Files of type <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <seecref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
329
332
<para>Elevation is required to extract a <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
330
333
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <seecref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <seecref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.IO.Stream,System.String,System.Boolean)" />.</para>
@@ -380,6 +383,7 @@ Extracting one of the tar entries would have resulted in a file outside the spec
380
383
<returns>A task that represents the asynchronous extraction operation.</returns>
381
384
<remarks>
382
385
<para>If a symbolic link or junction in the tar archive results in a file being extracted outside the specified <paramrefname="destinationDirectoryName" />, an <seecref="T:System.IO.IOException" /> is thrown to ensure extraction remains within the same directory.</para>
386
+
<para>If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.</para>
383
387
<para>Files of type <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" />, <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" />, or <seecref="F:System.Formats.Tar.TarEntryType.Fifo" /> can only be extracted in Unix platforms.</para>
384
388
<para>Elevation is required to extract a <seecref="F:System.Formats.Tar.TarEntryType.BlockDevice" /> or <seecref="F:System.Formats.Tar.TarEntryType.CharacterDevice" /> to disk.</para>
385
389
<para>This method stores in the task it returns all non-usage exceptions that the method's synchronous counterpart can throw. If an exception is stored into the returned task, that exception will be thrown when the task is awaited. Usage exceptions, such as <seecref="T:System.ArgumentException" />, are still thrown synchronously. For the stored exceptions, see the exceptions thrown by <seecref="M:System.Formats.Tar.TarFile.ExtractToDirectory(System.String,System.String,System.Boolean)" />.</para>
Copy file name to clipboardExpand all lines: xml/System.IO.Compression/ZipFile.xml
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1022,6 +1022,7 @@ An I/O error occurred while opening a file to be archived.</exception>
1022
1022
Exceptions related to validating the paths in the <paramrefname="destinationDirectoryName" /> or the files in the zip archive contained in <paramrefname="source" /> parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted.
1023
1023
Each extracted file has the same relative path to the directory specified by <paramrefname="destinationDirectoryName" /> as its source entry has to the root of the archive.
1024
1024
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1025
+
If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1025
1026
If a file to be archived has an invalid last modified time, the first date and time representable in the zip timestamp format (midnight on January 1, 1980) will be used.</remarks>
1026
1027
<exceptioncref="T:System.ArgumentException">
1027
1028
<paramrefname="destinationDirectoryName" /> is <seecref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
@@ -1102,6 +1103,7 @@ An archive entry was compressed by using a compression method that isn't support
1102
1103
This method creates the specified directory and all subdirectories. The destination directory cannot already exist. Exceptions related to validating the paths in the `destinationDirectoryName` or `sourceArchiveFileName` parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted. Each extracted file has the same relative path to the directory specified by `destinationDirectoryName` as its source entry has to the root of the archive.
1103
1104
1104
1105
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1106
+
If `destinationDirectoryName` or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1105
1107
1106
1108
## Examples
1107
1109
This example shows how to create and extract a zip archive by using the <xref:System.IO.Compression.ZipFile> class. It compresses the contents of a folder into a zip archive and extracts that content to a new folder. To use the <xref:System.IO.Compression.ZipFile> class, you must reference the `System.IO.Compression.FileSystem` assembly in your project.
@@ -1178,6 +1180,7 @@ An archive entry was compressed by using a compression method that isn't support
1178
1180
Exceptions related to validating the paths in the <paramrefname="destinationDirectoryName" /> or the files in the zip archive contained in <paramrefname="source" /> parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted.
1179
1181
Each extracted file has the same relative path to the directory specified by <paramrefname="destinationDirectoryName" /> as its source entry has to the root of the archive.
1180
1182
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1183
+
If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1181
1184
If a file to be archived has an invalid last modified time, the first date and time representable in the zip timestamp format (midnight on January 1, 1980) will be used.</remarks>
1182
1185
<exceptioncref="T:System.ArgumentException">
1183
1186
<paramrefname="destinationDirectoryName" /> is <seecref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.</exception>
@@ -1335,6 +1338,7 @@ Each entry will be extracted such that the extracted file has the same relative
1335
1338
The `sourceArchiveFileName` and `destinationDirectoryName` parameters accept both relative and absolute paths. A relative path is interpreted as relative to the current working directory.
1336
1339
1337
1340
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1341
+
If `destinationDirectoryName` or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1338
1342
1339
1343
If a file to be archived has an invalid last modified time, the first date and time representable in the zip timestamp format (midnight on January 1, 1980) will be used.
1340
1344
@@ -1443,6 +1447,7 @@ A <see cref="T:System.IO.Compression.ZipArchiveEntry" /> has been compressed usi
1443
1447
This method creates the specified directory and all subdirectories, if necessary. Exceptions related to validating the paths in the `destinationDirectoryName` or `sourceArchiveFileName` parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted. Each extracted file has the same relative path to the directory specified by `destinationDirectoryName` as its source entry has to the root of the archive.
1444
1448
1445
1449
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1450
+
If `destinationDirectoryName` or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1446
1451
1447
1452
If `entryNameEncoding` is set to a value other than `null`, entry names and comments are decoded according to the following rules:
1448
1453
@@ -1535,6 +1540,7 @@ If `entryNameEncoding` is set to `null`, entry names and comments are decoded ac
1535
1540
Exceptions related to validating the paths in the <paramrefname="destinationDirectoryName" /> or the files in the zip archive contained in <paramrefname="source" /> parameters are thrown before extraction. Otherwise, if an error occurs during extraction, the archive remains partially extracted.
1536
1541
Each extracted file has the same relative path to the directory specified by <paramrefname="destinationDirectoryName" /> as its source entry has to the root of the archive.
1537
1542
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1543
+
If <paramrefname="destinationDirectoryName" /> or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1538
1544
If a file to be archived has an invalid last modified time, the first date and time representable in the zip timestamp format (midnight on January 1, 1980) will be used.</remarks>
1539
1545
<exceptioncref="T:System.ArgumentException">
1540
1546
<paramrefname="destinationDirectoryName" /> is <seecref="F:System.String.Empty" />, contains only white space, or contains at least one invalid character.
@@ -1632,6 +1638,7 @@ An archive entry was compressed by using a compression method that isn't support
1632
1638
The `sourceArchiveFileName` and `destinationDirectoryName` parameters accept both relative and absolute paths. A relative path is interpreted as relative to the current working directory.
1633
1639
1634
1640
If an entry in the zip archive is a symbolic link, it's extracted as a regular folder since symbolic link information isn't preserved in the ZIP format.
1641
+
If `destinationDirectoryName` or any of its parent directories is a pre-existing junction or symbolic link, the link is followed and the extraction writes to the final target folder.
1635
1642
1636
1643
If a file to be archived has an invalid last modified time, the first date and time representable in the zip timestamp format (midnight on January 1, 1980) will be used.
0 commit comments