-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7z list bug with no datetime info #11
Comments
I am trying to reproduce the error via this function. |
hello, i tried to reproduce the error but could not find how to create a file with no timestamp |
Sorry for the delay. I did a stop in my project that i was using node-7z. https://sourceforge.net/projects/t7z/ The goal of the program is to use standard values when creating 7z to create identical files over multiple systems. So if i compress my files here, they will get the same hash of someone else. Here is one example file (github doesn't allow upload 7z). |
thanks for the file. in my file browser (Finder) all 3 dates are set to today. |
It's been some time since i've made the change. var e = {
date: new Date(res[1]),
attr: res[2],
size: parseInt(res[3], 10),
name: res[5].replace(path.sep, '/')
}; I've just checked if has a date, then uses new Date(), else, just send empty. And aparently solved the issue. if(parseInt(res[1])){ var return_date = new Date(res[1]); }
else{ var return_date = ""; }
var e = {
date: return_date,
attr: res[2],
size: parseInt(res[3], 10),
name: res[5].replace(path.sep, '/')
}; |
Closed in |
I found a bug in list in files which doesn't have date/time info, it's not usual i think, but i've found files like these:
7z_stdout.txt
I have made a fix in the file "lib/list.js" that worked for me:
Line 23: var regex = /([\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}]+) ([.DA]+) +(\d+)[ \d]+ (.+)/;
Line 56: if(parseInt(res[1])){ var return_date = new Date(res[1]); }
Line 57: else{ var return_date = ""; }
Line 58: var e = {
Line 59: date: return_date,
The changed file:
list.txt
The text was updated successfully, but these errors were encountered: