airbreather / StepperUpper

Some tools for making STEP happen.
MIT License
9 stars 2 forks source link

Fixed overwrite fails when copying directories #45

Closed lacqui closed 6 years ago

lacqui commented 6 years ago

Attempt to fix #44

BTW is there a reason that MD5s are organized by size rather than filename, or that extracts are done into random names? I have a local patch for extraction directories that makes debugging easier for me.

airbreather commented 6 years ago

Can you please help me understand why the existing code is insufficient? From my reading of your change, it looks like it's not doing anything that this block immediately following your changes wouldn't take care of.

Are you saying that the code inside the try is incorrect in cases where it doesn't throw? If so, why not just delete the try/catch block altogether?

BTW is there a reason that MD5s are organized by size rather than filename, or that extracts are done into random names? I have a local patch for extraction directories that makes debugging easier for me.

A few things going on here:

  1. Some files downloaded from the Nexus are named so horribly imprecisely that it was actually faster for me to re-download everything on-the-fly when I wanted to set up the pack again instead of hunt through the files. When I re-downloaded, I would rename the files so that if I did another setup in a few months, I wouldn't have that problem. I imagine others might have done the same.
  2. Maybe someone might rename a file if they get a bleeding-edge new version, perhaps prepending like "ZZZZ_OLD" to the old file.
  3. Extracting to directories with random names lets me get away with slightly shorter path strings than an alternative I've partially done in the past. Shorter path strings = more breathing room before #16 kicks in. Eventually, I'd like to get away from that by just extracting what we need into exactly where it goes (#21), but that's not a priority for me right now.
lacqui commented 6 years ago

OK now I see what's going on here. I'm going to look some more at the code. I was actually looking for a way of dealing with the second part of #21 when I saw this.

lacqui commented 6 years ago

Understanding where you were going with this, I'm going to close this PR.