Skip to content

Commit

Permalink
Fix: File Separator Issue when exporting via APICTL
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Jul 2, 2024
1 parent 3dbc29b commit d31df3d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.commons.io.FileUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.apimgt.api.APIConsumer;
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.model.APIKey;
Expand Down Expand Up @@ -95,8 +96,8 @@ public static File exportApplication(Application exportApplication, APIConsumer
// Creates a temporary directory to store the exported application artifact
File exportFolder = createTempApplicationDirectory(appName, appOwner);
exportApplicationBasePath = exportFolder.toString();
archivePath = exportApplicationBasePath
.concat(File.separator + appOwner.replace(File.separator, "#") + "-" + appName);
archivePath = exportApplicationBasePath.concat(
File.separator + appOwner.replace(CarbonConstants.DOMAIN_SEPARATOR, "#") + "-" + appName);
} catch (APIImportExportException e) {
throw new APIManagementException("Unable to create the temporary directory to export the Application", e);
}
Expand Down

0 comments on commit d31df3d

Please sign in to comment.