Error with ZipFile::Builder::WriteToStream()

I’m experiencing an issue with ZipFile::Builder::WriteToStream.

The function returns true and executes successfully under Win10_x64. But returns false in Win7_i386.

I’m compiling a 32-bit console executable in VS2015, platform toolset v140, using Juce library v4.3.1.

Thank you to anyone who can offer any suggestions.

Sample code:

   	ZipFile::Builder zipBuilder;
	File contentsFile = File::getSpecialLocation(File::userDesktopDirectory).getChildFile("test.txt");
	zipBuilder.addFile(contentsFile, 0);
	File outputFile = File::getSpecialLocation(File::userDesktopDirectory).getChildFile("test.zip");
	ScopedPointer <FileOutputStream> os = outputFile.createOutputStream();
	if (os==nullptr)
		NativeMessageBox::showMessageBox(AlertWindow::NoIcon,"Error", "Error creating output stream");	
	bool result = zipBuilder.writeToStream(*os, nullptr);
	if (!result)
		NativeMessageBox::showMessageBox(AlertWindow::NoIcon,"Error", "Error writing to stream");
	os->flush();

Does the contentsFile exist in both cases?

Yes, test.txt exists in the Desktop folder in both cases.

In the case of the function failing, a test.zip file is created, however the file size is 0 bytes.

The function also fails when attempting to write to a MemoryOutputStream instead of a FileOutputStream.

The issues still occurs after upgrading to Juce 5.1.1.

VS2017 also does not solve the issue.

Can you step inside the functions to see exactly where it is failing. Have you tried running your app with admin privileges? We don’t have any windows 7 machines here for us to reproduce.