no dir creation at getting info
This commit is contained in:
parent
e9b6aab04a
commit
c79003e014
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();
|
||||
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();
|
||||
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…
Add table
Add a link
Reference in a new issue