Skip to content

Conversation

@BrickOzp
Copy link
Contributor

When running the repair_settings with attachments directories
with non continous indexes, the indexes was reset to a continous
index. If one of the reindexed directories was selected as current
attachment directory, it would point to the wrong, or non existing
attachment directory index. Fix this by passing and using the current
indexes.

Non coninous indexes can happen if an attachment directory is removed
that is not the last.

Signed-off-by: Oscar Rydhé oscar.rydhe@gmail.com

When running the repair_settings with attachments directories
with non continous indexes, the indexes was reset to a continous
index. If one of the reindexed directories was selected as current
attachment directory, it would point to the wrong, or non existing
attachment directory index. Fix this by passing and using the current
indexes.

Non coninous indexes can happen if an attachment directory is removed
that is not the last.

Signed-off-by: Oscar Rydhé <oscar.rydhe@gmail.com>
@sbulen
Copy link
Contributor

sbulen commented Jan 10, 2022

I was able to confirm the bug using 2.0. Yep, if there was a gap, it renumbered, even if you didn't change anything... Once you hit SAVE.

I started testing all 3 of these together (#53 , #54 , #55 ) in SMF 2.0 and I am still seeing this bug in 2.0 even with these edits.

EDIT: Something funky was cached somewhere. Everything looks good!

Copy link
Contributor

@sbulen sbulen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - tested under both 2.0 & 2.1.

@sbulen
Copy link
Contributor

sbulen commented Jan 10, 2022

Also confirmed nothing got broken under 1.x...

@jdarwood007 jdarwood007 merged commit 68c14af into SimpleMachines:master Jan 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants