-
-
Notifications
You must be signed in to change notification settings - Fork 414
fixed the zippsource function, but it still names the zipped file as … #707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixed the zippsource function, but it still names the zipped file as … #707
Conversation
|
Issue #330 |
|
@anaypurohit0907 It has failed the testsuite's compress, extract test. Meaning the existing functionality has been broken due to this change. Can you check and fix that. |
|
I would say it makes more sense to name from the first file. Or users select in an arbitrary way, like this @yorukot thoughts ? |
|
yup youre right i think, i never thought about users selecting arbitrarily . super helpfull. ill rewrite that logic(idk how but ill do it) |
|
We should replace our zipSource function with a third party library. We dont need to reinvent the wheel. |
| fileName := filepath.Base(panel.element[panel.cursor].location) | ||
|
|
||
| // Create a slice to hold the paths of all selected files | ||
| var selectedFiles []string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You dont need this. The slice of selected files is already available as panel.selected
|
the third party library idea seems nice, but that is adding one more dependency, if you are okay with it ill try that |
|
Yes @anaypurohit0907 We are fine with it. We already use external library for extraction of archives. |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@lazysegtree i looked online but couldnt find any external library, all the results were using zip.Writer type from the archive/zip package. which is an inbuilt package i think. heres an example article i found : https://gosamples.dev/zip-file/ i think we are doing the same thing in the zipsource function anyways. we might have to continue using the current code, maybe improve its quality a bit. what do you think? |
|
okay. If we have to keep using current code its fine. |
529c554 to
54aee46
Compare
|
Issue addressed in this PR #821 |

…the last selected file, will work on changing that, but maybe having the last selected file makes sense?