Skip to content

Cleanups and improvements to output on snipeit:restore command#17966

Merged
snipe merged 1 commit intogrokability:developfrom
uberbrady:fix_filetype_validation
Oct 1, 2025
Merged

Cleanups and improvements to output on snipeit:restore command#17966
snipe merged 1 commit intogrokability:developfrom
uberbrady:fix_filetype_validation

Conversation

@uberbrady
Copy link
Copy Markdown
Member

@uberbrady uberbrady commented Oct 1, 2025

This tweaks a few different things about the snipeit:restore Artisan command:

  • Some directories that got renamed in August might not be put in the right place when restoring from an 'old' (pre-August 2025) version of Snipe-IT into a post-August version
  • public/uploads/assetmodels doesn't seem like it was ever a thing - pre- or post- August.
  • We don't need to keep reporting on every silly macOS resource fork that we skip. Nobody cares.
  • When we skip a 'bare directory' we don't need to report on those either.
  • I got tired of seeing files like .gitkeep, .gitignore and .DS_Store getting reported, so I pulled out reporting of them as well.
  • We make a different distinction between 'public' files and 'private' ones - for example, we allow you to have CSV's in private storage, but don't support them on the public side
  • We have to do some special logic to ensure that import files - which just end in csv without the . - can now be saved into the imports directory.

I was very tempted to refactor as I mentioned in the TODO but the fact is, this code works, as-is. So I decided against it. But I definitely would recommend that we do that refactor the next time we need to do any moderate amount of 'surgery' on this file.

@uberbrady uberbrady requested a review from snipe as a code owner October 1, 2025 21:20
@snipe snipe merged commit a6ded20 into grokability:develop Oct 1, 2025
7 of 8 checks passed
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.

2 participants