Commit 1ddf953
committed
Fix TemporaryFileSwap bug when file_path is a Path
This fixes the regression introduced in 9e86053 (gitpython-developers#1770) where the
file_path argument to TemporaryFileSwap.__init__ could no longer be
a Path object.
The change also makes this truer to the code from before gitpython-developers#1770,
still without the race condition fixed there, in that str was
called on file_path then as well. However, it is not clear that
this is a good thing, because this is not an idiomatic use of
mkstemp. The reason the `prefix` cannot be a Path is that it is
expected to be a filename prefix, with leading directories given in
the `dir` argument.1 parent 487a4fd commit 1ddf953
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
0 commit comments