|
|
@@ -11,7 +11,6 @@ import shop.alien.store.service.StoreInfoService;
|
|
|
import shop.alien.store.service.StorePaymentConfigCertService;
|
|
|
import shop.alien.store.service.StorePaymentConfigService;
|
|
|
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
import java.nio.file.Files;
|
|
|
import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
|
@@ -154,12 +153,12 @@ public class StorePaymentConfigCertServiceImpl implements StorePaymentConfigCert
|
|
|
void set(String certFilePath, String fileName);
|
|
|
}
|
|
|
|
|
|
- private void writeIfPresent(Path baseDir, String content, String fileName, PathUpdater updater, List<String> writtenPaths) throws Exception {
|
|
|
- if (!StringUtils.hasText(content)) {
|
|
|
+ private void writeIfPresent(Path baseDir, byte[] content, String fileName, PathUpdater updater, List<String> writtenPaths) throws Exception {
|
|
|
+ if (content == null || content.length == 0) {
|
|
|
return;
|
|
|
}
|
|
|
Path file = baseDir.resolve(fileName);
|
|
|
- Files.write(file, content.getBytes(StandardCharsets.UTF_8));
|
|
|
+ Files.write(file, content);
|
|
|
String certFilePath = file.toAbsolutePath().toString();
|
|
|
writtenPaths.add(certFilePath);
|
|
|
if (updater != null) {
|