Skip to content
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.

DefaultFileSystemReader: if directory does not exist, return empty list of file names. #2680

Merged
merged 1 commit into from
Mar 19, 2017

Conversation

damianh
Copy link
Member

@damianh damianh commented Jan 12, 2017

DefaultFileSystemReader: if directory does not exist, return empty list of file names. This fixes a cryptic TinyIoC exception that is thrown if the root path provider points to a path, or calculates a path that does not exist.

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the Nancy code style guidelines
  • I have provided test coverage for my change (where applicable)

Description

If the path does not exist (root path provider), it will result on a TinyIoC activation exception and not a useful one at that.

image

image

This prevents that exception from being thrown. The user will be subsequently get a different but more user friendly error later:

System.Exception: System.Exception : ConfigurableBootstrapper Exception
---- Nancy.RequestExecutionException : Oh noes!
-------- Nancy.ViewEngines.ViewNotFoundException : Unable to locate view 'doublequotedpartial'
Currently available view engine extensions: sshtml,html,htm
...

@thecodejunkie thecodejunkie added this to the 2.0-dangermouse milestone Jan 12, 2017
@damianh damianh changed the title DefaultFileSystemReader: if directory does not exist, return empty list of file names. [WIP] DefaultFileSystemReader: if directory does not exist, return empty list of file names. Jan 15, 2017
@damianh
Copy link
Member Author

damianh commented Jan 15, 2017

Do not merge, change will be re-targeted at master and will NOT be back ported to 1.x as it is a corner case.

@thecodejunkie
Copy link
Member

👀

@thecodejunkie
Copy link
Member

@damianh mate 😄

@damianh
Copy link
Member Author

damianh commented Mar 6, 2017

🕺 The big port and release week is upon us 🕺

@thecodejunkie
Copy link
Member

@damianh how about now? 😀

…st of file names. This fixes a cryptic TinyIoC exception that is thrown if the root path provider points to a path, or calculates a path that does not exist.
@damianh damianh changed the base branch from 1.x-WorkingBranch to master March 18, 2017 10:05
@damianh damianh changed the title [WIP] DefaultFileSystemReader: if directory does not exist, return empty list of file names. DefaultFileSystemReader: if directory does not exist, return empty list of file names. Mar 18, 2017
@jchannon jchannon merged commit 0439c48 into NancyFx:master Mar 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants