You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/node_modules/rename-cli/lib/replacements.js:419
let formattedDate = data.DateTime.split(/:|\s/)[1] + '/' + data.DateTime.split(/:|\s/)[2] + '/' + data.DateTime.split(/:|\s/)[0] + ' ' + data.DateTime.split(/:|\s/)[3] + ':' + data.DateTime.split(/:|\s/)[4] + ':' + data.DateTime.split(/:|\s/)[5];
^
TypeError: Cannot read property 'split' of undefined
at Object.function (/usr/local/lib/node_modules/rename-cli/lib/replacements.js:419:45)
at replaceVariables (/usr/local/lib/node_modules/rename-cli/rename.js:289:89)
at /usr/local/lib/node_modules/rename-cli/rename.js:50:29
at Array.forEach (<anonymous>)
at Object.getOperations (/usr/local/lib/node_modules/rename-cli/rename.js:33:9)
at renameFiles (/usr/local/lib/node_modules/rename-cli/bin.js:79:27)
at parseArgs (/usr/local/lib/node_modules/rename-cli/bin.js:66:5)
at /usr/local/lib/node_modules/rename-cli/bin.js:50:7
at /usr/local/lib/node_modules/rename-cli/node_modules/graceful-fs/graceful-fs.js:115:16
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
(Obviously, the above example is construed. I encountered the problem while renaming a bunch of files with rename * and now I have to sort out the pictures without EXIF manually.)
The problem is that the check on data.DateTime comes one line too late:
The existing intention seems to be to just return/use an empty string in such a case. I think it would also be desirable to get a warning on the console in such a case (and maybe skip renaming the file or use a string like ERROR or NOEXIF instead). I don't have a strong preference other than that code shouldn't crash and continue with the remaining files.
The text was updated successfully, but these errors were encountered:
results in
(Obviously, the above example is construed. I encountered the problem while renaming a bunch of files with
rename *
and now I have to sort out the pictures without EXIF manually.)The problem is that the check on
data.DateTime
comes one line too late:node-rename-cli/lib/replacements.js
Lines 419 to 420 in 5d75fdc
The existing intention seems to be to just return/use an empty string in such a case. I think it would also be desirable to get a warning on the console in such a case (and maybe skip renaming the file or use a string like
ERROR
orNOEXIF
instead). I don't have a strong preference other than that code shouldn't crash and continue with the remaining files.The text was updated successfully, but these errors were encountered: