This repository was archived by the owner on Aug 11, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ function Reader (props, currentStat) {
2121 props = { path : props }
2222 }
2323
24- if ( ! props . path ) {
25- self . error ( 'Must provide a path' , null , true )
26- }
27-
2824 // polymorphism.
2925 // call fstream.Reader(dir) to get a DirReader object, etc.
3026 // Note that, unlike in the Writer case, ProxyReader is going
@@ -85,6 +81,10 @@ function Reader (props, currentStat) {
8581
8682 Abstract . call ( self )
8783
84+ if ( ! props . path ) {
85+ self . error ( 'Must provide a path' , null , true )
86+ }
87+
8888 self . readable = true
8989 self . writable = false
9090
Original file line number Diff line number Diff line change @@ -30,8 +30,6 @@ function Writer (props, current) {
3030 props = { path : props }
3131 }
3232
33- if ( ! props . path ) self . error ( 'Must provide a path' , null , true )
34-
3533 // polymorphism.
3634 // call fstream.Writer(dir) to get a DirWriter object, etc.
3735 var type = getType ( props )
@@ -61,6 +59,8 @@ function Writer (props, current) {
6159
6260 Abstract . call ( self )
6361
62+ if ( ! props . path ) self . error ( 'Must provide a path' , null , true )
63+
6464 // props is what we want to set.
6565 // set some convenience properties as well.
6666 self . type = props . type
You can’t perform that action at this time.
0 commit comments