Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Converter: overwriting a source file deletes it without warning (Read 2155 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Converter: overwriting a source file deletes it without warning

If you convert from, say, test.flac to test.flac in the same folder the file is gone. You get asked to overwrite it first (unless that's how it's set up already), but there is no warning that the file could get deleted. At the end the report says the files "converted with major problems"...

This seems like a potentially dangerous UX, even though it's probably a rare use case.*
Maybe foobar could detect that the overwritten files are actually source files and show an error.


*Besides accidents, some legit use cases could be adding DSP, reducing bitrate, ...

Re: Converter: overwriting a source file deletes it without warning

Reply #1
How exactly you got such result?
I just tried it and fb2k gives out error message "Conversion failed: File is already in use" and source file remains intact in it's original location. At least this is how it is in fb2k 1.4.5.

Re: Converter: overwriting a source file deletes it without warning

Reply #2
It is achievable when not converting over pipes. Rather nasty issue.

Re: Converter: overwriting a source file deletes it without warning

Reply #3
 :o  I tried with %s too, bit still can't  see this problem.

 

Re: Converter: overwriting a source file deletes it without warning

Reply #4
I can reproduce it with a clean (portable) install of 1.4.5.
Although I always use my own flac.exe for conversion, I don't have the Encoder Pack installed. Maybe this is the reason?

Re: Converter: overwriting a source file deletes it without warning

Reply #5
Ah, i see now. I have option "Leave partial files for aborted or failed conversions" enabled. If this option is disabled, indeed source file is gone.

Re: Converter: overwriting a source file deletes it without warning

Reply #6
Thanks for reporting. This behavior will be changed in a future update.
Microsoft Windows: We can't script here, this is bat country.

Re: Converter: overwriting a source file deletes it without warning

Reply #7
Should be fixed in 1.4.6 beta.
Microsoft Windows: We can't script here, this is bat country.

Re: Converter: overwriting a source file deletes it without warning

Reply #8
Not entirely. If the Output path is set to Ask me later it still deletes the source and makes no new file.


Also the If file already exists settings have no effect when it comes to source files. Whether you set Ask, Skip or Overwrite it always makes a new file with (1) at the end without asking. And with the output path set to Ask me later it always asks for overwrite confirmation and then deletes it.

Perhaps a better solution would be a notification that says "Cannot overwrite source files" and options like "Skip / all" and "Append (1) to file name / all" when the user chooses to overwrite the source (either manually or with the Overwrite setting).

Re: Converter: overwriting a source file deletes it without warning

Reply #9
Right, it still tries to overwrite source file if you convert one file and specifically tell it to overwrite, then fails. Fixed for the next update.
Microsoft Windows: We can't script here, this is bat country.

Re: Converter: overwriting a source file deletes it without warning

Reply #10
Improved in beta 2.
Microsoft Windows: We can't script here, this is bat country.

Re: Converter: overwriting a source file deletes it without warning

Reply #11
Anyone here? As for me If file already exists option doesn't work at all. I always see filename (1).mp3