Added support for absolute paths for PublicDirectory configuration value.
This commit is contained in:
parent
191d903b2d
commit
9acaf35935
5 changed files with 14 additions and 6 deletions
|
@ -156,7 +156,15 @@ namespace ScrewTurn.Wiki {
|
|||
/// Gets the Public Directory of the Wiki.
|
||||
/// </summary>
|
||||
public static string PublicDirectory {
|
||||
get { return RootDirectory + PublicDirectoryName + Path.DirectorySeparatorChar; }
|
||||
get {
|
||||
string pubDirName = PublicDirectoryName;
|
||||
if(Path.IsPathRooted(pubDirName)) return pubDirName;
|
||||
else {
|
||||
string path = Path.Combine(RootDirectory, pubDirName);
|
||||
if(!path.EndsWith(Path.DirectorySeparatorChar.ToString())) path += Path.DirectorySeparatorChar;
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue