Skip to content

fix: allow duplicate downloads by unique filenames#121

Open
sinkaroid wants to merge 1 commit intoalphasp:masterfrom
sinkaroid:fix/enhanceSaveImage
Open

fix: allow duplicate downloads by unique filenames#121
sinkaroid wants to merge 1 commit intoalphasp:masterfrom
sinkaroid:fix/enhanceSaveImage

Conversation

@sinkaroid
Copy link

Proposed changes

  • Prevent 'false success' where repeated downloads looks no action in Gallery due to same file path.
  • Ensure re-downloading older images (e.g., from last year) creates a new, visible file instead of silently reusing the same path with no action.

What changed

  • Allow duplicate images for redownloading
  • Added getUniqueFilePath() to append _1, _2, ... until a free filename is found.

Real use case

I love the simplicity for PxViewr, I hope this project still maintained..
So.. I often re-download older images saved long ago (e.g., last year, last month or even last week). I expected the app to overwrite or at least surface a new file, but because the same path is reused, Gallery shows no visible changes.

This change ensures a new filename for duplicates, so re-downloading old images actually produces a visible new file.

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.

1 participant