Skip to content

Speed up DSID assignment and fix error in link copying

Spyros Argyropoulos requested to merge someFixes into master

Description of bug

When the DSID directory was outside the mcjoboptions dir the following situation happened:

  • DSIDtoMove was set to e.g. ../100xxx/100000 -> this was used to filled the keys of DSIDdict
  • linkedDir was set to whatever the link was pointing to e.g. ../../100xxx/100000 (a valid path **but not one that was in DSIDdict)

As a result the link was not updated to the correct directory as described in #209 (closed)

To fix this we need to do a loose match instead of an exact key match in the DSIDdict.

Changes introduced

  • Fix bug when copying link
  • Also speeding up DSID assignment using set operation (the speedup for me is >> x10 - I'm surprised that nobody had complained so far, since the script was basically completely unusable, taking several minutes to go through and assign free DSIDs. Now it takes less than 10 sec.)

Tests

Before fix

See #209 (closed)

After fix

Screenshot_2023-05-18_at_19.56.04

Issues resolved

Closes #208 (closed) #209 (closed)

Edited by Spyros Argyropoulos

Merge request reports

Loading