fixes unexistant directory case
This commit is contained in:
parent
3216748449
commit
4419475148
1 changed files with 4 additions and 2 deletions
|
|
@ -9,11 +9,13 @@ namespace Yavsc.Helpers
|
||||||
{
|
{
|
||||||
if (estimate?.Query?.PerformerProfile?.Performer == null)
|
if (estimate?.Query?.PerformerProfile?.Performer == null)
|
||||||
return null;
|
return null;
|
||||||
var fsp = new PhysicalFileProvider(
|
var di = new DirectoryInfo(Path.Combine(
|
||||||
Path.Combine(
|
|
||||||
userFileDir,
|
userFileDir,
|
||||||
estimate.Query.PerformerProfile.Performer.UserName
|
estimate.Query.PerformerProfile.Performer.UserName
|
||||||
));
|
));
|
||||||
|
if (!di.Exists) return null;
|
||||||
|
|
||||||
|
var fsp = new PhysicalFileProvider(di.FullName);
|
||||||
return fsp.GetDirectoryContents(
|
return fsp.GetDirectoryContents(
|
||||||
Path.Combine(Constants.UserBillsFilesDir, estimate.Id.ToString())
|
Path.Combine(Constants.UserBillsFilesDir, estimate.Id.ToString())
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue