Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix: create File error on linux #235

Merged
merged 1 commit into from
Jan 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package com.microsoft.hydralab.center.service;

import com.microsoft.hydralab.center.repository.AgentUserRepository;
import com.microsoft.hydralab.center.util.CenterConstant;
import com.microsoft.hydralab.center.util.SecretGenerator;
import com.microsoft.hydralab.common.entity.center.AgentUser;
import com.microsoft.hydralab.common.entity.center.SysUser;
Expand Down Expand Up @@ -138,7 +139,7 @@ public File generateAgentConfigFile(String agentId) {
File agentConfigFile = File.createTempFile(
"application",
".yml",
new File(".\\"));
new File(CenterConstant.CENTER_TEMP_FILE_DIR));

FileWriter fileWriter = new FileWriter(agentConfigFile.getAbsolutePath());
fileWriter.write("app:\n" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@

public class CenterConstant {
public static final String CENTER_FILE_BASE_DIR = "storage/test/package/";
public static final String CENTER_TEMP_FILE_DIR = "storage/temp/";
}