mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-03-28 04:07:01 -05:00
InjectLogic: Don't try to create null parent
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* This file is part of fabric-loom, licensed under the MIT License (MIT).
|
||||
*
|
||||
* Copyright (c) 2022 FabricMC
|
||||
* Copyright (c) 2022-2023 FabricMC
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -53,7 +53,11 @@ public final class InjectLogic implements StepLogic {
|
||||
Path from = iter.next();
|
||||
Path relative = injectedFiles.relativize(from);
|
||||
Path to = fs.getPath(relative.toString().replace(relative.getFileSystem().getSeparator(), "/"));
|
||||
Files.createDirectories(to.getParent());
|
||||
|
||||
if (to.getParent() != null) {
|
||||
Files.createDirectories(to.getParent());
|
||||
}
|
||||
|
||||
Files.copy(from, to, StandardCopyOption.REPLACE_EXISTING);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user