Clear old fs::path when moving a TemporaryDirectory
authorJoseph Griego <jgriego@fb.com>
Tue, 24 May 2016 20:14:54 +0000 (13:14 -0700)
committerFacebook Github Bot 6 <facebook-github-bot-6-bot@fb.com>
Tue, 24 May 2016 20:23:36 +0000 (13:23 -0700)
commite6edf05a6ff6b4729f599fbc4aabece2fb7871cf
treeae815dd893959f84f35393db6a9a4587afa9f4a9
parent81959105c3c084dce3e8d7c0c957a19f02f725a8
Clear old fs::path when moving a TemporaryDirectory

Summary:
If a TemporaryDirectory with scope DELETE_ON_DESTRUCTION gets moved
and then goes out of scope, the directory will be deleted while the moved
object still holds that path; we just clear the path from the old object to
prevent this

Reviewed By: yfeldblum

Differential Revision: D3331079

fbshipit-source-id: 9c99413661e2436ccec937d3fa652da810133b34
folly/experimental/TestUtil.cpp
folly/experimental/TestUtil.h
folly/experimental/test/TestUtilTest.cpp