Find/Replace in files deletes my files!

Having trouble installing Oxygen? Got a bug to report? Post it all here.
honyk
Posts: 176
Joined: Wed Apr 29, 2009 4:55 pm

Find/Replace in files deletes my files!

Post by honyk »

Hello,

I've found quite dangerous behaviour of Oxygen feature Find/Replace in Files.

Find/Replace in Files has the default setting, i.e. these options are checked:
  • Search also in tags
  • Make backup files with extension BAK
  • Recurse subdirectories
Other options are unchecked.

I use Specified path to define the folder and enter a text to find and text for replacement. When I press the button Replace all, the results are following:
  • The original XML files in the defined folder are deleted.
  • Only the backup BAK files stay there.
  • No replacement is performed – as there are no XML files where it could be done.
  • For the BAK files it only says: Could not rename the backup file to its original name. (Which does not make sense in this context.)
  • All this is performed only on the first level in the folder, not recursively.
  • It also tries to access the hidden folder .svn (even though the option Include hidden files is not checked).
In sum, it would be better to disable this feature than this.

Jan
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Re: Find/Replace in files deletes my files!

Post by sorin_ristache »

Hello,
honyk wrote:When I press the button Replace all, the results are following:
  • The original XML files in the defined folder are deleted.
  • Only the backup BAK files stay there.
  • No replacement is performed – as there are no XML files where it could be done.
  • For the BAK files it only says: Could not rename the backup file to its original name. (Which does not make sense in this context.)
  • All this is performed only on the first level in the folder, not recursively.
Do you mean a backup file with the extension .xml.bak is created in the same folder as the original .xml file but a file with the original file name does not exist anymore? I cannot reproduce that. What is the path of the folder from the field Specified path? Can you send us a zip archive with a folder and some subfolders with sample files and specify the find and replace expressions?
honyk wrote:[*]It also tries to access the hidden folder .svn (even though the option Include hidden files is not checked).[/list]
The option Include hidden files covers the files and folders that have the hidden attribute set in the filesystem, not folder names that start with a dot.


Regards,
Sorin
Post Reply