Title: Bug found while saving the backup file path
Last modified: January 12, 2020

---

# Bug found while saving the backup file path

 *  Resolved [basile67](https://wordpress.org/support/users/basile67/)
 * (@basile67)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/bug-found-while-saving-the-backup-file-path/)
 * Hi,
 * While I used your plugin in windows environment using wamp server I found a bug
   that has to do with the saved backup file path in db. Because the file path include(\)
   backslashes that can not be saved in database without a fix in your code.
 * For example:
    The path C:\wamp64\www\wordpress/wp-content/ew-backup/dir/filename.
   jpg will be saved in db like: C:wamp64wwwwordpress/wp-content/ew-backup/dir/filename.
   jpg
 * As you can see it’s not able to retrieve the correct file path and when the user
   try to restore the file he gets an error.
 * There are 2 ways to solve this problem:
 * In file: easy-watermark/src/class/Backup/LocalBackupper.php before line 62 (update_post_meta(
   $attachment_id, ‘_ew_backup_file’, $new_filepath ); you must add:
 * a) $new_filepath = str_replace( ‘\\’, ‘/’, $new_filepath ); in order to replace
   all backslashes with forwardslashes, or
 * b) $new_filepath = esc_sql( $new_filepath ); which will replace all \ with \\
   and thus the file path will be correctly saved in meta_value field.
 * Please update your code.
 * Thanks
    -  This topic was modified 6 years, 4 months ago by [basile67](https://wordpress.org/support/users/basile67/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/bug-found-while-saving-the-backup-file-path/#post-12318695)
 * Thanks for the detailed description! We’ll be updating the plugin with this fix
 *  Plugin Author [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * (@kubitomakita)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/bug-found-while-saving-the-backup-file-path/#post-12464723)
 * We just released version 1.0.6 which fixes this.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bug found while saving the backup file path’ is closed to new replies.

 * ![](https://ps.w.org/easy-watermark/assets/icon.svg?rev=2153955)
 * [Easy Watermark](https://wordpress.org/plugins/easy-watermark/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-watermark/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-watermark/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-watermark/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-watermark/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-watermark/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Kuba Mikita](https://wordpress.org/support/users/kubitomakita/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/bug-found-while-saving-the-backup-file-path/#post-12464723)
 * Status: resolved