• Resolved aurepons

    (@aurepons)


    Hi, I have found a little bug in your function lana_downloads_manager_parse_file_path in file lana-downloads-manager.phb, line 1390.

    The problem is for testing purposes in windows server at localhost. With the last update you compare $file_path and $wp_uploads_dir, and the comparison fails in some cases as there are some diference in slashes of windows server routes.

    I found the problem is solved easily if you use wordpress normalize function in line 1385 like that $file_path = wp_normalize_path(realpath( $file_path ));

    Thank you very much

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Lana Codes

    (@lanacodes)

    Awesome, thank you for the advice.

    In the next version, I will add wp_normalize_path() for Windows compatibility.

    Thread Starter aurepons

    (@aurepons)

    Thank you and congratulations for your plugin, is the best one ??

    Plugin Author Lana Codes

    (@lanacodes)

    Thank you for the kind words, I always appreciate positive feedback.

    I am testing your solution in a Windows environment, but I noticed that the wp_uploads basedir may be the problem, because:

    $wp_uploads["basedir"]: C:\xampp\htdocs\wordpress/wp-content/uploads

    and if I give it a realpath:

    $wp_uploads_dir = realpath( $wp_uploads['basedir'] );

    because then it will be:

    $wp_uploads_dir (after realpath): C:\xampp\htdocs\wordpress\wp-content\uploads

    everything works perfectly.

    But it is still possible to use a wp_normalize_path after the realpath in any case. I am still testing the possibilities and I’m trying to find the best solution.

    Plugin Author Lana Codes

    (@lanacodes)

    Fixed in version 1.8.1, please download and try it yourself too.

    Thank you again for your feedback.

    Thread Starter aurepons

    (@aurepons)

    Yes!! Problem is solved thank you very much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bug in ‘Local file with an absolute path is not allowed.’’ is closed to new replies.