Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Temporary files on Windows #63
This issue is somewhat related to issue #53, but that one has a misleading subject.
On Windows the current default implementation of
The alternative implementation might be ok on Linux systems, but doesn't work on Windows. And a hard-coded path isn't a good idea anyway.
In the meantime I implemented a Windows and MSVC specific solution and of course I can post it here.
Additionally you can find under the following link a generic implementation: An all-singing, all-dancing C function to create a temporary file. Maybe this could be a generic solution for creating temporary files.
That incredible piece of software engineering has been a thorn in my side for years. The Perl and Python versions of this library have options to override the default temp directory.
Yes. That might help someone else who is struggling with this problem.
I'm little reticent to include something like this but there may be no choice for Windows users. I'll look into adding it on a branch for testing and take it from there.
sorry for the delay. I was busy in my job.
I'll try to provide a variant that might be usable not only with MSVC. Not sure whether I succeed. I'll post the code early next week.
In fact, my implementation is similar to the generic implementation I quoted - just without the unneeded bits and pieces.
No problem. We all have jobs and probably none of them relate to creating Excel files for a living.
I'm going to put together a branch with the above library as an optional make option on Unix and as the default on Windows. I'll ping you when I've implemented and tested it a bit. If it looks stable I'll merge it to master.
I've pushed a version using tmpfileplus as the default tmpfile handler to the following branch: https://github.com/jmcnamara/libxlsxwriter/tree/tmpfileplus
I need to add some more documentation and fix the Mac cocoapod files but if you get a chance you can test it to see if it works for you.
referenced this issue
Jul 10, 2016
I tested the new implementation. It works as expected.
There is only one thing that I don't like in
Alternatively, the default value in