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
SFTPFIle breaks on prefetch, because server cannot FSTAT calls to file handles, but only STAT. #444
I'm using paramiko via PySFTP to connect to a client's sftp server. The client is running WSSFTP Server by IPSwitch. I'm seeing really weird behaviour from their server, that I've traced down to the following reproducible issue:
If you call SFTPClient.stat('folder/folder/filename.txt'), the server returns the appropriate status.
If you call SFTPFile.stat(), the server gets confused, and returns:
IOError: Folder not found: D:\sftp-root\folder\folder\filename.txt
Note that the slashes have turned the wrong way now.
I have a proposed fix for this I'm going to submit as a PR. Please let me know if the paramiko philosophy is not to make these changes for compatibility with poor servers, in which case I'll drop this change.
@danverbraganza We evaluate nonstandard platform support on a patch by patch basis; when the changes are small and fix something users can't easily work around, probably ok; when the changes are less small or otherwise higher-risk (eg they might introduce bugs in the normal use cases) we're more likely to say 'sorry'.
Can't tell without seeing the patch though :) I don't see a PR related to this so do submit one if you like! (Or link to a gist of the diff, or paste it in here, whichever.)
Closing this both due to timeout & because I wonder if fixes in 1.16.x relating to prefetching (specifically, when/how it's called during regular get/put operations) may have also fixed this? Happy to reopen if more details come in.
Activity
lndbrg commentedon Nov 20, 2014
Send it! :) If possible add new tests for the issue too.
danverbraganza commentedon Nov 21, 2014
Update: Turns out the server with the strange behaviour is WSSFTP Server by IPSwitch.
bitprophet commentedon Dec 15, 2014
@danverbraganza We evaluate nonstandard platform support on a patch by patch basis; when the changes are small and fix something users can't easily work around, probably ok; when the changes are less small or otherwise higher-risk (eg they might introduce bugs in the normal use cases) we're more likely to say 'sorry'.
Can't tell without seeing the patch though :) I don't see a PR related to this so do submit one if you like! (Or link to a gist of the diff, or paste it in here, whichever.)
bitprophet commentedon Apr 25, 2016
Closing this both due to timeout & because I wonder if fixes in 1.16.x relating to prefetching (specifically, when/how it's called during regular
get/putoperations) may have also fixed this? Happy to reopen if more details come in.