You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sftp.Glob returns incorrect path of found file or dir #531
If we use pattern with trailing slash, like "/home/" and such object exist, than sftp.Glob duplicates object's name, and returns "/home/home". It happens because c.Lstat(pattern) finds existing object with trailing slash, but Split(pattern) doesn't split dir and object, and then Join(dir, file.Name()) joins duplicates.
Activity
puellanivis commentedon Nov 10, 2022
Hm… yeah, this splitting and cleaning path code doesn’t seem to be in the original. In this specific path, it just returns
[]string{pattern}, nil.Not sure what we can update by porting the current code over again. 🤔 But this at least is something we should probably fix.