File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change 1- Support deleting paths longer than 260 characters on windows created inside tmpdir.
1+ Support deleting paths longer than 260 characters on windows created inside tmpdir.
Original file line number Diff line number Diff line change @@ -99,6 +99,7 @@ def chmod_rw(p: str) -> None:
9999 func (path )
100100 return True
101101
102+
102103def create_long_path (path : Path ) -> Path :
103104 """Construct a path which will work on Windows if greater
104105 than 260 characters. Resolves into a absolute path which
@@ -111,6 +112,7 @@ def create_long_path(path: Path) -> Path:
111112 path = Path ("\\ \\ ?\\ " + str (path ))
112113 return path
113114
115+
114116def rm_rf (path : Path ) -> None :
115117 """Remove the path contents recursively, even if some elements
116118 are read-only.
Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ def renamed_failed(*args):
9090 maybe_delete_a_numbered_dir (path )
9191 assert not lock_path .is_file ()
9292
93+
9394def test_long_path_during_cleanup (tmp_path ):
9495 """Ensure that deleting long path works (particularly on Windows (#6775))."""
9596 path = tmp_path / ("a" * 200 )
You can’t perform that action at this time.
0 commit comments