Make WordPress Core


Ignore:
Timestamp:
10/18/2008 07:48:49 PM (16 years ago)
Author:
ryan
Message:

Recognize windows absolute paths. see #7904

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post.php

    r9239 r9242  
    2929    $file = get_post_meta( $attachment_id, '_wp_attached_file', true );
    3030    // If the file is relative, prepend upload dir
    31     if ( 0 !== strpos($file, '/') && ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) )
     31    if ( 0 !== strpos($file, '/') && !preg_match('|^.:\\\|', $file) && ( ($uploads = wp_upload_dir()) && false === $uploads['error'] ) )
    3232        $file = $uploads['basedir'] . "/$file";
    33        
    3433    if ( $unfiltered )
    3534        return $file;
Note: See TracChangeset for help on using the changeset viewer.