removes a duplicated slash

main
Paul Schneider 7 years ago
parent f32f37da5d
commit c5699db198
1 changed files with 1 additions and 3 deletions

@ -28,11 +28,9 @@ namespace Yavsc.ViewModels.UserFiles
throw new NotSupportedException("No user name, no user dir."); throw new NotSupportedException("No user name, no user dir.");
UserName = username; UserName = username;
var finalPath = username; var finalPath = username;
if (!string.IsNullOrWhiteSpace(path))
finalPath += Path.DirectorySeparatorChar + path;
if (!finalPath.IsValidYavscPath()) if (!finalPath.IsValidYavscPath())
throw new InvalidOperationException( throw new InvalidOperationException(
$"File name contains invalid chars, using path {finalPath}"); $"File name contains invalid chars ({finalPath})");
dInfo = new DirectoryInfo( dInfo = new DirectoryInfo(
userReposPath+Path.DirectorySeparatorChar+finalPath); userReposPath+Path.DirectorySeparatorChar+finalPath);

Loading…