Get rid of LimitedFs - FIXME needs docs on copying single files
If remote:path points to a file make NewFs return a sentinel error fs.ErrorIsFile and an Fs which points to the parent. Use this to remove the LimitedFs and just add this file to the --files-from list. This means that server side operations can be used also. Fixes #518 Fixes #545
This commit is contained in:
+2
-2
@@ -167,11 +167,11 @@ func NewFs(name, root string) (fs.Fs, error) {
|
||||
|
||||
// Make inner swift Fs from the connection
|
||||
swiftFs, err := swift.NewFsWithConnection(name, root, c)
|
||||
if err != nil {
|
||||
if err != nil && err != fs.ErrorIsFile {
|
||||
return nil, err
|
||||
}
|
||||
f.Fs = swiftFs
|
||||
return f, nil
|
||||
return f, err
|
||||
}
|
||||
|
||||
// Purge deletes all the files and the container
|
||||
|
||||
Reference in New Issue
Block a user