Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #246 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

double slashes causes exception

Reported by: per.magne.skuseth@… Owned by: alexander@…
Priority: major Component: EPiImage
Keywords: Cc:

Description (last modified by per.magne.skuseth@…) (diff)

First of all: I am using the EPiCode.DatabaseFileSystem which might have something to do with the issues I am experiencing :-)

I have specified scaledImageVPPPath to /Upload/Scaled/.

In EPiImageEngine.cs at line the following code is found at line 197:

 string pathToSizeDir = dirTo + "/" + dirSizeKey;

This causes the path to get double slashes (/Upload/Scaled//) - which causes the GetDirectory to return null - which gives me an exception.
I tried to change to scaledImageVPPPath to /Upload/Scaled , but this caused the ResizeImage method to fail - because there is no + "/" in there.

This could easily be fixed by changing

 string pathToSizeDir = dirTo + "/" + dirSizeKey;

to

 string pathToSizeDir = dirTo + dirSizeKey;

or

string pathToSizeDir = dirTo.EndsWith("/") ? dirTo + dirSizeKey : dirTo + "/" + dirSizeKey;

It might be the DataBaseFileSystem that does not cope well with the double slashes, but I dont really see why there should be an extra "/"?

Should I commit?

Change History

comment:1 Changed 7 years ago by simon@…

  • Description modified (diff)

(just formatting code to make it easier to read... (hint))

comment:2 Changed 7 years ago by per.magne.skuseth@…

  • Description modified (diff)

Removed silly error in description

Last edited 7 years ago by per.magne.skuseth@… (previous) (diff)

comment:3 Changed 7 years ago by alexander@…

Yes, please commit the changes :-)

comment:4 Changed 7 years ago by per.magne.skuseth@…

  • Status changed from new to closed
  • Resolution set to fixed

Fixed. Ref [2031]

Note: See HelpUser/Tickets for help on using tickets.