Hi, I was using WAFileMetadataLibrary and i found a possible issue with* **addFileAt: aPath relativeToRootDirectory: relativeRootDirectory*. The problem i encountered is that some css with(../img/someImage.png) was getting pointed towards *http://localhost:8080/files/img/someImage.png* rather than *http://localhost:8080/files/MyWAFileMetadataLibrary/img/someImage.png* upon further looking into the code i found that in *addFileAt: aPath relativeToRootDirectory: relativeRootDirectory.* * * there is a line *relativeFilepath := relativeFilepath replaceAll: pathSeparator with:'/'. * * * here i found that the path with '\' *(im in wondows)* will not be replaced with '/'. so i had override and change the line to *relativeFilepath := relativeFilepath replaceAll: pathSeparator first with: $/.* * * which worked for me, and the calls from css got pointed to *http://localhost:8080/files/MyWAFileMetadataLibrary/img/someImage.png.* * * Could anyone in the community pls verify it and let me know if i am not further messing things up , and if its ok, pls could you correct *WAFileMetadaLibrary *accordinly? Thanks in Advance, G R Thushar PS: I think my mails are not reaching you. So i am posting the same in stackoverlow too. I hope thats ok. * *
On Jun 29, 2013, at 3:59 PM, Thushar G R <thushar.gr@gmail.com> wrote:
Hi,
I was using WAFileMetadataLibrary and i found a possible issue with addFileAt: aPath relativeToRootDirectory: relativeRootDirectory.
The problem i encountered is that some css with(../img/someImage.png) was getting pointed towards http://localhost:8080/files/img/someImage.png
rather than
http://localhost:8080/files/MyWAFileMetadataLibrary/img/someImage.png
upon further looking into the code i found that in addFileAt: aPath relativeToRootDirectory: relativeRootDirectory.
there is a line
relativeFilepath := relativeFilepath replaceAll: pathSeparator with:'/'.
This is strange since the code should be platform driven. This is question for the seaside mailing-list :)
here i found that the path with '\' (im in wondows) will not be replaced with '/'.
so i had override and change the line to
relativeFilepath := relativeFilepath replaceAll: pathSeparator first with: $/.
which worked for me, and the calls from css got pointed to
http://localhost:8080/files/MyWAFileMetadataLibrary/img/someImage.png.
Could anyone in the community pls verify it and let me know if i am not further messing things up , and if its ok, pls could you correct WAFileMetadaLibrary accordinly?
Thanks in Advance,
G R Thushar
PS: I think my mails are not reaching you. So i am posting the same in stackoverlow too. I hope thats ok.
participants (2)
-
Stéphane Ducasse -
Thushar G R