Fix bug with wrong paths in windows
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		@ -1,5 +1,9 @@
 | 
			
		||||
import { FS, Path, Tar } from "./deps.ts";
 | 
			
		||||
 | 
			
		||||
function toUnix(path: string): string {
 | 
			
		||||
   return path.replace(/\\/g, "/");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 * Uncompresses a tar file to a certain location
 | 
			
		||||
 * @param {string} src Tar file to be uncompressed
 | 
			
		||||
@ -65,7 +69,7 @@ export async function compress(
 | 
			
		||||
      }
 | 
			
		||||
      const walker = FS.walk(src, { includeDirs: true, includeFiles: true });
 | 
			
		||||
      for await (const file of walker) {
 | 
			
		||||
         const relativePath = Path.relative(root, file.path);
 | 
			
		||||
         const relativePath = toUnix(Path.relative(root, file.path));
 | 
			
		||||
         if (file.isDirectory) {
 | 
			
		||||
            await tar.append(relativePath, {
 | 
			
		||||
               type: "directory",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user