Skip to content

Commit 3f18f8d

Browse files
committed
make sure we don't have dupes in our paths ArrayList
1 parent 20883b2 commit 3f18f8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

srcwr💾/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ pub extern "C" fn rust_post_to_replay_thread(
8888
unsafe {
8989
let len = pathsarray.size;
9090
for i in 0..len {
91-
pathsvec.push(strxx(ICellArray_at(pathsarray, i), false, 0).unwrap_or_default().to_string());
91+
let s = strxx(ICellArray_at(pathsarray, i), false, 0).unwrap_or_default().to_string();
92+
if !pathsvec.contains(&s) {
93+
pathsvec.push(s);
94+
}
9295
}
9396
}
9497

0 commit comments

Comments
 (0)