fix issue with petstore in windows

This commit is contained in:
wing328
2015-12-03 00:44:15 +08:00
parent 7fd281a98e
commit 1f68d0f7b0

View File

@@ -15,6 +15,7 @@ import java.io.File;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.regex.Matcher;
import org.apache.commons.lang3.StringUtils;
@@ -129,7 +130,7 @@ public class PhpClientCodegen extends DefaultCodegen implements CodegenConfig {
return (getPackagePath() + File.separatorChar + basePath
// Replace period, backslash, forward slash with file separator in package name
+ packageName.replaceAll("[\\.\\\\/]", File.separator)
+ packageName.replaceAll("[\\.\\\\/]", Matcher.quoteReplacement(File.separator))
// Trim prefix file separators from package path
.replaceAll(regFirstPathSeparator, ""))
// Trim trailing file separators from the overall path