Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jensen
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Skye Yu
jensen
Commits
78516a75
Commit
78516a75
authored
Jul 21, 2025
by
martin hou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 仅为重复了的条目使用新的md5签名
parent
43b53583
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
jensen.js
src/utils/jensen.js
+12
-8
No files found.
src/utils/jensen.js
View file @
78516a75
...
...
@@ -800,15 +800,19 @@ Jensen.prototype.listFiles = async function () {
}
// 如果files有重复的signature,那就持续改为不重复的为止
let
seen
=
new
Set
();
for
(
let
i
=
0
;
i
<
files
.
length
;
i
++
)
{
let
file
=
files
[
i
];
while
(
seen
.
has
(
file
.
signature
))
{
// Append a random number to make signature unique
file
.
signature
=
md5
(
file
.
signature
+
Math
.
random
());
}
seen
.
add
(
file
.
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
}
`
);
}
});
// 如果已经等待过长的时间了,那就直接返回好了
let
kv
=
tag
+
'-timer'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment