no dir creation at getting info

main
Paul Schneider 7 years ago
parent 0b268d0289
commit 119d772ec4
1 changed files with 9 additions and 6 deletions

@ -36,12 +36,15 @@ namespace Yavsc.ViewModels.UserFiles
dInfo = new DirectoryInfo(
userReposPath+FileSystemConstants.RemoteDirectorySeparator+finalPath);
if (!dInfo.Exists) dInfo.Create();
if (dInfo.Exists) {
Files = dInfo.GetFiles().Select
( entry => new RemoteFileInfo { Name = entry.Name, Size = entry.Length,
CreationTime = entry.CreationTime, LastModified = entry.LastWriteTime }).ToArray();
SubDirectories = dInfo.GetDirectories().Select
( d=> new DirectoryShortInfo { Name= d.Name, IsEmpty=false } ).ToArray();
}
}
}

Loading…