Skip to content

Commit

Permalink
Normalize paths when adding intermediate directories
Browse files Browse the repository at this point in the history
  • Loading branch information
dwalluck committed Apr 16, 2024
1 parent 095ac5b commit 7f486a3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*******************************************************************************/
package de.dentrassi.rpm.builder;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.ByteBuffer;
Expand Down Expand Up @@ -131,7 +132,7 @@ private List<String> getIntermediateDirectories(String targetName) {

for (int i = 1; i < path.getNameCount(); i++) {
Path subPath = path.subpath(0, i);
intermediateDirectories.add("/" + subPath);
intermediateDirectories.add("/" + subPath.toString().replace(File.separatorChar, '/'));
}

return intermediateDirectories;
Expand Down

0 comments on commit 7f486a3

Please sign in to comment.