Prevent overwriting files #33

Closed
opened 2026-01-29 16:33:26 +00:00 by claunia · 2 comments
Owner

Originally created by @cfsmp3 on GitHub (Nov 4, 2014).

If at any point a check could be inserted to check whether a .bin file is being processed with -out=bin as an output setting, that would be great. As is, accidentally doing that results in deleting the source file (overwriting it with a blank file, more accurately) which is very bad! (And something I just did.)

Originally created by @cfsmp3 on GitHub (Nov 4, 2014). If at any point a check could be inserted to check whether a .bin file is being processed with -out=bin as an output setting, that would be great. As is, accidentally doing that results in deleting the source file (overwriting it with a blank file, more accurately) which is very bad! (And something I just did.)
Author
Owner

@Akirato commented on GitHub (Mar 23, 2015):

Could you share a sample? I am not getting this error in a normal case.
Again, I don't know the source code yet. But I saw that a check is implemented when an
output file is created which is like one of the beginning steps.
Do you get an output file too?
I think a check can probably be implemented whenever a file is written or opened for writing.

@Akirato commented on GitHub (Mar 23, 2015): Could you share a sample? I am not getting this error in a normal case. Again, I don't know the source code yet. But I saw that a check is implemented when an output file is created which is like one of the beginning steps. Do you get an output file too? I think a check can probably be implemented whenever a file is written or opened for writing.
Author
Owner

@okisseloff commented on GitHub (Apr 7, 2015):

I have created a pull request https://github.com/CCExtractor/ccextractor/pull/149 for this case and my solution doesn't let user to make bin-to-bin and raw-to-raw extraction (or any other smth-to-smth). Are these extractions useless and mean that user was accidentally mistaken with arguments as they seem to me? If not, I will create another pull request where "out." will be added to the output filename if this happens.

@okisseloff commented on GitHub (Apr 7, 2015): I have created a pull request https://github.com/CCExtractor/ccextractor/pull/149 for this case and my solution doesn't let user to make bin-to-bin and raw-to-raw extraction (or any other smth-to-smth). Are these extractions useless and mean that user was accidentally mistaken with arguments as they seem to me? If not, I will create another pull request where "out." will be added to the output filename if this happens.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#33