File tree Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Expand file tree Collapse file tree 5 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -50,11 +50,9 @@ pub fn hash_buffer(buffer: impl AsRef<[u8]>) -> String {
5050///
5151/// Will return error if unable to access file.
5252pub fn hash_file ( filepath : impl AsRef < Path > ) -> Result < String > {
53- hash_stream (
54- & mut File :: open ( & filepath) . context ( selector:: InvalidFileOrDirPath {
55- path : filepath. as_ref ( ) ,
56- } ) ?,
57- )
53+ hash_stream ( & mut File :: open ( & filepath) . context ( selector:: InvalidPath {
54+ path : filepath. as_ref ( ) ,
55+ } ) ?)
5856}
5957/// Evaluate checksum hash of a directory.
6058///
@@ -65,7 +63,7 @@ pub fn hash_dir(dirpath: impl AsRef<Path>) -> Result<String> {
6563 let summary: BTreeMap < String , String > = dirpath
6664 . as_ref ( )
6765 . read_dir ( )
68- . context ( selector:: InvalidFileOrDirPath {
66+ . context ( selector:: InvalidPath {
6967 path : dirpath. as_ref ( ) ,
7068 } ) ?
7169 . map ( |path| {
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ impl fmt::Debug for OrcaError {
122122 match & self . kind {
123123 Kind :: AgentCommunicationFailure { backtrace, .. }
124124 | Kind :: IncompletePacket { backtrace, .. }
125- | Kind :: InvalidFileOrDirPath { backtrace, .. }
125+ | Kind :: InvalidPath { backtrace, .. }
126126 | Kind :: MissingInfo { backtrace, .. }
127127 | Kind :: BollardError { backtrace, .. }
128128 | Kind :: ChronoParseError { backtrace, .. }
Original file line number Diff line number Diff line change @@ -194,7 +194,7 @@ impl LocalFileStore {
194194 Ok ( (
195195 serde_yaml:: from_str (
196196 & fs:: read_to_string ( path. clone ( ) )
197- . context ( selector:: InvalidFileOrDirPath { path } ) ?,
197+ . context ( selector:: InvalidPath { path } ) ?,
198198 ) ?,
199199 None ,
200200 hash. to_owned ( ) ,
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub(crate) enum Kind {
3737 backtrace : Option < Backtrace > ,
3838 } ,
3939 #[ snafu( display( "{source} ({path:?})." ) ) ]
40- InvalidFileOrDirPath {
40+ InvalidPath {
4141 path : PathBuf ,
4242 source : io:: Error ,
4343 backtrace : Option < Backtrace > ,
Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl Orchestrator for LocalDockerOrchestrator {
9494 let location = namespace_lookup[ & image_info. namespace ] . join ( & image_info. path ) ;
9595 let byte_stream = FramedRead :: new (
9696 File :: open ( & location)
97- . context ( selector:: InvalidFileOrDirPath { path : & location } )
97+ . context ( selector:: InvalidPath { path : & location } )
9898 . await ?,
9999 BytesCodec :: new ( ) ,
100100 )
You can’t perform that action at this time.
0 commit comments