-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Paperboy overwrites files with duplicate names #6
Comments
That's true, right now paperboy doesn't care, but we can definitely put in a little check. If you happen to be interested in contributing I can walk you through the code to find the right place to integrate this. |
Sure! I'd be happy to add a quick feature like this. |
So I've identified the place the changes need to be made, but before I go ahead with some changes, do you have an error mechanism in mind? Exceptions or |
Great! If you have a preference then feel free to choose. But if you are not sure, then I was thinking to change the return of
into something like But that's just me keeping it stupid simple and exception free, if you have more experience with idiomatic handling of these things, then I'm happy to learn about those. I guess the question is if we want to also catch errors about non-existing directories, file system errors and whatever else can happen. What about crazy scenarios where I manually move/delete the file while I'm renaming it. Not sure I care enough about that scenario, but it might pay off thinking about the edge cases. |
@xldenis do you still work on this? |
No, I completely forgot about this!! Go ahead and take over. |
Unfortunately I lack the time to do so, sorry :( |
It will make it into a future version, no worries. I'm basically just waiting until I figure out a slightly easier way to create little popups (because we need a confirm/cancel dialog in this case). Right now with the way I do it, it's a bit annoying to create a dialog, so I have to learn more |
Hi I would like to work on this :) |
Hi Shaurya! You're very welcome to hack on this, do you need help or do you just want to send me an initial PR with the suggested code? |
Sure I can send a PR. Need to check how to handle dialog box. |
If you accept the name suggestion from paperboy, it will happily overwrite any files that happen to have that name in the library folder. Luckily in this case it was overwriting another copy of the same paper but it would be nice to have overwrite safeguards.
Reproduction:
The text was updated successfully, but these errors were encountered: