Skip to content

ext.php don't find extension's style.css on Wamp #994

@laurent-angeli

Description

@laurent-angeli

Hi,
When trying to make my own extension on Wamp system, I found that ext.php fail on finding style.css
On FRESHRSS_VERSION = 1.1.3-beta,
Here is what is_valid_path() function work with :
$path : D:\wamp\www\FreshRSS\extensions\xExtension-GlobalEnhanced\static\style.css
EXTENSIONS_PATH : D:\wamp\www\FreshRSS/extensions
$path_relative_to_ext : xExtension-GlobalEnhanced\static\style.css

First test fail because of D:\wamp\www\FreshRSS\extensions !== D:\wamp\www\FreshRSS/extensions

My work around :
File: D:\wamp\www\FreshRSS\constants.php
11: define('FRESHRSS_PATH', str_replace("\","/",dirname(**FILE**)));

First test pass but second test fail because of explode('/',$path_relative_to_ext) which count 0
instead of 3
Second work around :
File: FreshRSS\p\ext.php
40: $absolute_filename = str_replace("\","/", realpath(EXTENSIONS_PATH . '/' . $file_name));

Problem occurs because dirname and realpath use '\' on windows sytem.

Maybe you have another way to work around this problem ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions