mirror of
				https://github.com/strapi/strapi.git
				synced 2025-11-04 11:54:10 +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);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        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({
 | 
			
		||||
          method: 'POST',
 | 
			
		||||
@ -467,12 +468,12 @@ module.exports = function (strapi) {
 | 
			
		||||
        .on('close', function () {
 | 
			
		||||
 | 
			
		||||
          let folderDest;
 | 
			
		||||
          const folderOrFiletoRemove = path.resolve(data.dest);
 | 
			
		||||
          const folderOrFiletoRemove = path.normalize(data.dest);
 | 
			
		||||
 | 
			
		||||
          if (data.src === 'api') {
 | 
			
		||||
            folderDest = folderOrFiletoRemove;
 | 
			
		||||
          } else {
 | 
			
		||||
            folderDest = path.resolve(data.dest, '..');
 | 
			
		||||
            folderDest = path.join(data.dest, '..');
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          fs.remove(folderOrFiletoRemove, function (err) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user