Commit 1d0e8ad4 authored by martin hou's avatar martin hou

fix: 恢复对重复签名的处理

parent 39e87717
...@@ -800,6 +800,22 @@ Jensen.prototype.listFiles = async function () { ...@@ -800,6 +800,22 @@ Jensen.prototype.listFiles = async function () {
if (fcount == -1) { if (fcount == -1) {
// return []; // return [];
} }
// 如果files有重复的signature,那就持续改为不重复的为止
// Check for duplicate signatures and regenerate if needed
const signatureCounts = {};
files.forEach(file => {
signatureCounts[file.signature] = (signatureCounts[file.signature] || 0) + 1;
});
// Only regenerate signatures for items that have duplicates
files.forEach(file => {
if (signatureCounts[file.signature] > 1) {
// Add timestamp to make signature unique
file.signature = md5(`${file.name}${file.length}`);
}
});
if ((fc && files.length >= fc.count) || (fcount > -1 && files.length >= fcount)) { if ((fc && files.length >= fc.count) || (fcount > -1 && files.length >= fcount)) {
// delete jensen[tag]; // delete jensen[tag];
jensen[tag] = null; jensen[tag] = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment