getting some interface to fs
This commit is contained in:
@ -47,7 +47,6 @@ namespace Yavsc.Helpers
|
||||
|
||||
public static UserDirectoryInfo GetUserFiles(string userName, string subdir)
|
||||
{
|
||||
|
||||
UserDirectoryInfo di = new UserDirectoryInfo(UserFilesDirName, userName, subdir);
|
||||
return di;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ namespace Yavsc.ViewModels.UserFiles
|
||||
if (string.IsNullOrWhiteSpace(username))
|
||||
throw new NotSupportedException("No user name, no user dir.");
|
||||
UserName = username;
|
||||
var finalPath = username;
|
||||
var finalPath = path == null ? username : Path.Combine(username, path);
|
||||
if (!finalPath.IsValidYavscPath())
|
||||
throw new InvalidOperationException(
|
||||
$"File name contains invalid chars ({finalPath})");
|
||||
|
Reference in New Issue
Block a user