-
-
Notifications
You must be signed in to change notification settings - Fork 44
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
Add :open attachments command #31
Conversation
src/commands.rs
Outdated
return Result::Err(CommandError::InvalidArgument); | ||
} | ||
|
||
let flags = DownloadFlags::OPEN; |
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.
Can you add here:
if desc.bang {
flags |= DownloadFlags::FORCE;
}
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.
my bad, fixed
src/windows/room/chat.rs
Outdated
); | ||
let err = UIError::Failure(msg); | ||
if filename.exists() { | ||
if !flags.intersects(DownloadFlags::FORCE | DownloadFlags::OPEN) { |
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.
Check just for DownloadFlags::FORCE
here, so that :open
doesn't accidentally overwrite an already existing file.
I've merged this into main. Thank you for adding the new command! |
Thank you for helping me out! |
Fixes #27