yireo / Yireo_NextGenImages

45 stars 28 forks source link

[FIX] add relative-path of source image to target-path if target is cache-folder #62

Closed rommelfreddy closed 7 months ago

rommelfreddy commented 1 year ago

if an image exist with the same name on two different locations, the module may override the image.

so we need a function to add the relative path to the target directory.

Feel free to add unit tests

jissereitsma commented 1 year ago

Could it be that this is actually already supported by the original cache folder itself? I might be interpreting your PR in the wrong way though. In later releases of the module, the cache folder is made configurable: https://github.com/yireo/Yireo_NextGenImages/blob/master/etc/config.xml#L21

rommelfreddy commented 1 year ago

sorry to reopen this issue. i miss-interpreted your referred code.

No this resolves not the issue.

The issue is, that if two same named images does exist in two different locations - e.g.

this will result in unexpected behaviours. So we have to add the relative path to the new directory, if it is in a different directory.

I changed my commit, cause this is not really a feature. it is more a bug fix.