diff --git a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ExportUtils.java b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ExportUtils.java index 109d4ab7a553..a1c3eae28b4f 100644 --- a/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ExportUtils.java +++ b/components/apimgt/org.wso2.carbon.apimgt.rest.api.store.v1/src/main/java/org/wso2/carbon/apimgt/rest/api/store/v1/utils/ExportUtils.java @@ -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; @@ -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); }