mirror of
https://github.com/zhigang1992/adm-zip.git
synced 2026-04-29 20:35:51 +08:00
Under windows, the path should be normalize first, otherwise the localPath will still use back slash
This commit is contained in:
@@ -235,8 +235,9 @@ module.exports = function(/*String*/input) {
|
||||
}else{
|
||||
zipPath="";
|
||||
}
|
||||
localPath = localPath.split("\\").join("/"); //windows fix
|
||||
// normalize the path first
|
||||
localPath = pth.normalize(localPath);
|
||||
localPath = localPath.split("\\").join("/"); //windows fix
|
||||
if (localPath.charAt(localPath.length - 1) != "/")
|
||||
localPath += "/";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user