@@ -141,8 +141,6 @@ func (t *translateContext) rewritePath(
141141 interp , err = t .translateFilePath (ctx , input , localPath , localRelPath )
142142 case paths .TranslateModeDirectory :
143143 interp , err = t .translateDirectoryPath (ctx , input , localPath , localRelPath )
144- case paths .TranslateModeLocalAbsoluteFile :
145- interp , err = t .translateLocalAbsoluteFilePath (ctx , input , localPath , localRelPath )
146144 case paths .TranslateModeLocalAbsoluteDirectory :
147145 interp , err = t .translateLocalAbsoluteDirectoryPath (ctx , input , localPath , localRelPath )
148146 case paths .TranslateModeLocalRelative :
@@ -232,20 +230,6 @@ func (t *translateContext) translateDirectoryPath(ctx context.Context, literal,
232230 return path .Join (t .remoteRoot , localRelPath ), nil
233231}
234232
235- func (t * translateContext ) translateLocalAbsoluteFilePath (ctx context.Context , literal , localFullPath , localRelPath string ) (string , error ) {
236- info , err := t .b .SyncRoot .Stat (localRelPath )
237- if errors .Is (err , fs .ErrNotExist ) {
238- return "" , fmt .Errorf ("file %s not found" , literal )
239- }
240- if err != nil {
241- return "" , fmt .Errorf ("unable to determine if %s is a file: %w" , filepath .FromSlash (localFullPath ), err )
242- }
243- if info .IsDir () {
244- return "" , fmt .Errorf ("expected %s to be a file but found a directory" , literal )
245- }
246- return localFullPath , nil
247- }
248-
249233func (t * translateContext ) translateLocalAbsoluteDirectoryPath (ctx context.Context , literal , localFullPath , _ string ) (string , error ) {
250234 info , err := os .Stat (filepath .FromSlash (localFullPath ))
251235 if errors .Is (err , fs .ErrNotExist ) {
0 commit comments