recently encountered a strange thing, using nodejs to write a file packaging script , the corresponding file to generate a compressed package . However, the files are inconsistent when the generated package is unzipped on the Ubuntu and Window system respectively. ? at this time my heart is almost broken
Window files under the system
WindowUbuntu
file is written in nodejs, and the core code is as follows
//
archive.directory(projectPath, projectName);
//node_modules
archive.directory(node_modulesVersionPath + osVersion +"/", projectName + "/node_modules/");
the environment in which scripts are executed is Window system, and under the node_modulesVersionPath + osVersion
path is node_modules modules from different operating system installations .
the zip file can be confirmed to be the same.
use certutil-hashfile under window system. / linux_x64.zip MD5,
use md5sum. / linux_x64.zip,
MD5 codes are all 19a09b9fb2f0aae7fd013fc0b9da434f
files are transferred between systems through VM Tools ,
the decompression of compressed package files under ubantu system uses the extraction function of the system,
decompression of compressed package files under window system uses 360compression
compressed files are not consistent among different systems. unzipped files are transferred between different systems, and the contents remain unchanged
can this be saved?