mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-02-01 12:19:14 +01:00
Fix bugs in unit tests which occur on Windows only (#1927)
On Windows it is much more necessary to close files to avoid locked files which prevent deleting a temporary file or folder. Also paths need to be handled differently because of the drive letter and colon appearing on Windows.
This commit is contained in:
committed by
GitHub
parent
63ec4e6172
commit
0f01bb82c6
@@ -34,7 +34,6 @@ import sonia.scm.store.StoreEntryMetaData;
|
||||
import sonia.scm.store.StoreType;
|
||||
|
||||
import javax.inject.Inject;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
@@ -51,7 +50,7 @@ public class TarArchiveRepositoryStoreImporter {
|
||||
try (TarArchiveInputStream tais = new NoneClosingTarArchiveInputStream(inputStream)) {
|
||||
ArchiveEntry entry = tais.getNextEntry();
|
||||
while (entry != null) {
|
||||
String[] entryPathParts = entry.getName().split(File.separator);
|
||||
String[] entryPathParts = entry.getName().split("/");
|
||||
validateStorePath(repository, entryPathParts);
|
||||
importStoreByType(repository, tais, entryPathParts, logger);
|
||||
entry = tais.getNextEntry();
|
||||
|
||||
Reference in New Issue
Block a user