Skip to content

Work around Windows problems with temporary directories - #72

Merged
dscho merged 2 commits into
masterfrom
windows-temp-dir
May 26, 2014
Merged

dscho merged 2 commits into
masterfrom
windows-temp-dir

Conversation

@dscho

@dscho dscho commented May 26, 2014

Copy link
Copy Markdown
Contributor

Hmpf. Windows. Windows is a little different than every normal operating system. Just a little, just different enough to require extra attention. Windows is special. And Windows takes the special bus, once again.

Still needs testing on Windows (which the primary reason to open a PR that I'll probably merge right away, once the testing shows that it works).

dscho added 2 commits May 26, 2014 13:19
Windows really does not let you delete files that are in use, even if
"in use" really means that there is a ClassLoader referencing that file
and that ClassLoader just happens not to be garbage-collected yet.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When calling said method from the same code location multiple times, we
should still get an empty temporary directory every time, even if there
are still-open files in the directory of the default name. For Windows,
emptying directories poses an insurmountable problem when they contain
files that are still in use, therefore we have to fall back to creating
new temporary directories.

Identified by Jennyver Jenkins as a problem when building and testing
ij1-patcher on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho added a commit that referenced this pull request May 26, 2014
Work around Windows problems with temporary directories
@dscho
dscho merged commit d04585a into master May 26, 2014
@dscho
dscho deleted the windows-temp-dir branch May 26, 2014 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant