hharyono
95e69bc032
[WindowsBase] Fix ZipPackage.WriteContentType when extension is empty. ( #4943 )
...
When a part without extension was added an empty Extension attribute was written, which is incorrect and didn't match the Windows/.NET implementation:

2018-04-19 01:04:54 +02:00
Francois Botha
41fe812a81
Correctly detect relative Uri in package parts ( #3630 )
2017-04-03 16:48:34 +02:00
Alexander Köplinger
07baa1cce4
[WindowsBase] Fix off-by-one error in ZipTime
...
The date/time struct in zip.h defines the month value as
uInt tm_mon; /* months since January - [0,11] */
.NET's DateTime object in turn stores months from 1-12. We didn't
take this into account when passing the values from managed->native
so the month ended up being off by one.
We didn't use this codepath before https://github.com/mono/mono/pull/3036
that's why it didn't show up until now.
2016-05-31 13:55:05 +02:00
Marek Safar
24230862fe
[WindowsBase] Fixes test assert expectation logic
2016-05-31 10:07:11 +02:00
Alexander Köplinger
e765e70945
Merge pull request #3036 from tritao/windowsbase_zip_datetime
...
[WindowsBase] Fixed System.IO.Packaging creating Zip archive with wrong date time entries
2016-05-25 19:28:55 +02:00
Marek Safar
aae26db0c2
[WindowsBase] Fix for the new .rels file when it's shorter than the old. A fix for #41203
2016-05-25 17:03:50 +02:00
Joao Matos
bc1967e73b
[System.IO.Compression] Fixed date time handling of Zip entries.
2016-05-23 20:19:22 +01:00
ash-lshift
71f7cda39a
[WindowsBase] Fix PackagePart.GetRelationships for readonly files
...
Do not throw an exception when we are creating the PackageRelationship.
We should only do that if the user tries to add a new one.
Fixes https://bugzilla.novell.com/show_bug.cgi?id=675379
2015-08-18 09:30:42 -03:00
Alexander Köplinger
ddcfc42070
Cleanup namespace names of class lib tests to follow convention
...
A couple of the test suites didn't follow the MonoTests.<namespace of class under test> naming convention for the namespace.
2014-09-04 18:55:58 +02:00
Marcos Henrich
33f0c427f7
Removed [Category("NotWorking")] from PackUriHelperTests.
...
CompareInvalidTest is still not working because .NET PackUriHelper.ComparePackUri is doing something that uses Uri and throws an exception whereas Mono is not.
2014-08-07 09:02:49 +01:00
Alan McGovern
7818d339e5
[System.IO.Packaging] Disable some failing tests again
...
All the failing tests are disabled now.
2012-12-16 16:39:45 +00:00
Pablo Ruiz Garcia
a0395f9c77
[System.IO.Packaging] Fix incorrect conversion of relative uris to absolute uris
...
Fixed loading of PackagePart relationships to avoid (incorrect) conversion of
relative target uris into absolute. (fixes xamarin bug #6602 )
2012-12-16 16:23:27 +00:00
Alan McGovern
8c06ad3203
[WindowsBase] Nuke a broken test
...
This looks like it's testing the behaviour of a stream with invalid
data which is already tested (correctly) in another test.
2012-10-21 22:57:20 -04:00
Pablo Ruiz Garcia
fe99400095
Fix implementation of System.IO.Packaging::GetRelativeUri(Uri,Uri) [fixes xamarin's bug #2727 ].
2012-10-13 01:23:47 +02:00
Alan McGovern
e49f4636a9
[WindowsBase] Add better support for Default/Override content_types
...
System.IO.Packaging already had full support for parsing [Content_Types].xml
if it contained both <Override> and <Default> nodes when specifying content
types for files. However we had taken a shortcut before by explicitly writing
the content type of each file using an <Override> attribute for every file. We
now properly write a <Default> element and only use <Override> attributes when
required.
2011-10-18 11:43:58 +01:00
Alan McGovern
5736b87f2f
[System.IO.Packaging] Fix some dispose related issues
...
Ensure we can call dispose multiple times without blowing up. Also
ensure that we do not close streams which are passed in by the user.
We should only close streams which are implicitly created by the API.
This is a modification of the patch proposed for bug #1464 , which is
now fixed by this commit.
2011-10-18 00:45:38 +01:00
Jérémie Laval
e42fb4ccaf
[WindowsBase] Don't treat special file [Content-Types].xml as a part, ends up as a duplicate when writing back a package
2011-10-11 16:14:50 +02:00
Rolf Bjarne Kvinge
1d149efc1c
[WindowsBase] Relationship ids must be valid XML identifiers.
2011-10-07 09:38:31 +02:00
Alan McGovern
c29472db13
[System.IO.Packaging] Add another test
2011-08-17 13:44:54 +01:00
Raja R Harinath
b293948fb7
EOL handling
...
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.
With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
2010-07-25 20:17:39 +05:30
Miguel de Icaza
5e52dab0a6
Put WindowsBase on mcs/class for System.IO.Packaging
...
svn path=/trunk/mcs/; revision=141398
2009-09-06 23:19:06 +00:00
Miguel de Icaza
fd4cade468
move back to olive
...
svn path=/trunk/mcs/; revision=118141
2008-11-06 19:14:34 +00:00
Alan McGovern
30ad4ba80c
* WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs:
...
* WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs: Properties
which are null should not be serialized.
svn path=/trunk/mcs/; revision=117893
2008-11-04 16:19:26 +00:00
Alan McGovern
831c7c8695
* WindowsBase/WindowsBase.dll.sources:
...
* WindowsBase/System.IO.Packaging/Package.cs:
* WindowsBase/System.IO.Packaging/ZipPackage.cs:
* WindowsBase/System.IO.Packaging/PackUriHelper.cs:
* WindowsBase/Test/System.IO.Packaging/FakePackage.cs:
* WindowsBase/System.IO.Packaging/PackageProperties.cs:
* WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs: Complete the
implementation of loading/saving PackageProperties. NUnit tests now
pass.
svn path=/trunk/mcs/; revision=117891
2008-11-04 16:09:28 +00:00
Alan McGovern
0af7e5f3e6
* WindowsBase/System.IO.Packaging/PackageProperties.cs:
...
* WindowsBase/Test/System.IO.Packaging/PackagePartTest.cs:
* WindowsBase/System.IO.Packaging/PackagePropertiesPart.cs:
* WindowsBase/Test/System.IO.Packaging/FakePackageTests.cs: Implement
the backend for loading/saving package properties. Add tests for this
code.
svn path=/trunk/mcs/; revision=117876
2008-11-04 13:42:15 +00:00
Alan McGovern
d72e4c702f
Moving WindowsBase into the mcs tree
...
svn path=/trunk/mcs/; revision=117800
2008-11-03 19:30:08 +00:00