mattcasters opened a new pull request, #7804: URL: https://github.com/apache/hop/pull/7804
## Summary Fixes [#3209](https://github.com/apache/hop/issues/3209): adding or removing files on the Text File Input **File** tab no longer resets an explicit **Content → Compression** setting (e.g. GZip) back to **None**. ### Root cause `TextFileInputDialog.checkCompressedFile()` re-derived compression from filename extensions on every Add/Delete. When no extension matched a compression provider, it **forced** the combo to `None`, overwriting the user's choice. ### Fix (GUI only) Single method change in `TextFileInputDialog` — no meta, runtime, XML, or engine changes: 1. **Skip auto-detect** when Compression is already something other than `None` / empty (preserve explicit user selection). 2. **Auto-detect only when Compression is still `None`**, if a known extension (`.gz`, `.zip`, …) is present. 3. **Do not force** Compression to `None` when no matching extension is found. 4. **Bug fix:** use `fileRecord[0]` (filename column) instead of `fileRecord[i]` when reading the extension. ### Compatibility Text File Input is widely used. This PR deliberately limits the change to dialog UX so pipeline XML, MDI, Beam, and transform execution are untouched. Runtime continues to use whatever compression is stored after OK. ### Behavior after this change | Current Compression | File action | Before | After | |---------------------|-------------|--------|-------| | GZip | Add plain `.txt` | Reset to None (bug) | Stay GZip | | None | Add `.gz` | Set GZip | Set GZip (unchanged) | | None | Add `.txt` | Set None | Stay None | | GZip | Delete a listed file | Could reset to None | Stay GZip | Trade-off: with Compression already set to GZip, adding a `.zip` file will **not** auto-switch to Zip. Users can still change Compression on the Content tab. That is preferable to clobbering an explicit choice. ## Test plan - [x] Module compiles (`plugins/transforms/textfile`) - [x] Manual: set Compression = GZip, Add non-`.gz` file → Compression stays GZip - [ ] Manual: Compression = None, Add `file.gz` → auto-selects GZip - [ ] Manual: Compression = None, Add `file.zip` → auto-selects Zip - [ ] Manual: open existing transform with GZip + files → dialog shows GZip - [ ] Manual: after preserving GZip, OK and reopen → value persisted in meta - [ ] Manual: with GZip set, delete a file from the list → GZip not cleared -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
