[wp-trac] [WordPress Trac] #43908: Export keeps generating new .zip files on Windows installations

WordPress Trac noreply at wordpress.org
Mon Apr 30 19:36:12 UTC 2018


#43908: Export keeps generating new .zip files on Windows installations
--------------------------+-----------------------------
 Reporter:  xkon          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:
 Severity:  normal        |   Keywords:  gdpr
  Focuses:                |
--------------------------+-----------------------------
 In `file.php` line 2146 we have `update_post_meta( $request_id,
 '_export_file_path', $archive_pathname );` to update the filepath of the
 exported zip file.

 In windows the file path uses `\` instead of `/` and they get stripped out
 when the `update_post_meta` happens.

 This results in an error when downloading / mailing the file so it always
 generates a new .zip file.

 I've made a check by doing an `$archive_pathname = str_replace( '\\', '/',
 $archive_pathname );` just before the update_post_meta and it works but
 not sure if that's the way to go.

 ( not sure if it's my installation only either but I've never seen it
 happen again and I was always working on Windows maybe it's an
 update_post_meta thing? )

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/43908>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list