@@ -141,8 +141,6 @@ func (t *translateContext) rewritePath(
141
141
interp , err = t .translateFilePath (ctx , input , localPath , localRelPath )
142
142
case paths .TranslateModeDirectory :
143
143
interp , err = t .translateDirectoryPath (ctx , input , localPath , localRelPath )
144
- case paths .TranslateModeLocalAbsoluteFile :
145
- interp , err = t .translateLocalAbsoluteFilePath (ctx , input , localPath , localRelPath )
146
144
case paths .TranslateModeLocalAbsoluteDirectory :
147
145
interp , err = t .translateLocalAbsoluteDirectoryPath (ctx , input , localPath , localRelPath )
148
146
case paths .TranslateModeLocalRelative :
@@ -232,20 +230,6 @@ func (t *translateContext) translateDirectoryPath(ctx context.Context, literal,
232
230
return path .Join (t .remoteRoot , localRelPath ), nil
233
231
}
234
232
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
-
249
233
func (t * translateContext ) translateLocalAbsoluteDirectoryPath (ctx context.Context , literal , localFullPath , _ string ) (string , error ) {
250
234
info , err := os .Stat (filepath .FromSlash (localFullPath ))
251
235
if errors .Is (err , fs .ErrNotExist ) {
0 commit comments