mirror of
https://github.com/strapi/strapi.git
synced 2025-11-23 13:40:58 +00:00
Fix path for Windows
This commit is contained in:
parent
0f650ba780
commit
b17a31c518
@ -448,7 +448,8 @@ module.exports = function (strapi) {
|
|||||||
deferred.reject(err);
|
deferred.reject(err);
|
||||||
}
|
}
|
||||||
|
|
||||||
const fileToUnzip = path.resolve(strapi.config.appPath, '.tmp', derivedKey.toString('hex') + '.zip');
|
// Force posix to be fully compatible with the Studio server
|
||||||
|
const fileToUnzip = path.posix.normalize(path.join(strapi.config.appPath, '.tmp', derivedKey.toString('hex') + '.zip'));
|
||||||
|
|
||||||
request({
|
request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@ -467,12 +468,12 @@ module.exports = function (strapi) {
|
|||||||
.on('close', function () {
|
.on('close', function () {
|
||||||
|
|
||||||
let folderDest;
|
let folderDest;
|
||||||
const folderOrFiletoRemove = path.resolve(data.dest);
|
const folderOrFiletoRemove = path.normalize(data.dest);
|
||||||
|
|
||||||
if (data.src === 'api') {
|
if (data.src === 'api') {
|
||||||
folderDest = folderOrFiletoRemove;
|
folderDest = folderOrFiletoRemove;
|
||||||
} else {
|
} else {
|
||||||
folderDest = path.resolve(data.dest, '..');
|
folderDest = path.join(data.dest, '..');
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.remove(folderOrFiletoRemove, function (err) {
|
fs.remove(folderOrFiletoRemove, function (err) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user