mar10 / pyftpsync

Synchronize directories using FTP(S), SFTP, or file system access.
https://pyftpsync.readthedocs.io
MIT License
117 stars 25 forks source link

netrc #73

Closed YurkoWasHere closed 2 years ago

YurkoWasHere commented 2 years ago

This line is confusing https://github.com/mar10/pyftpsync/blob/fd6471b34cc2145cdc9a469016ad08273d13b211/ftpsync/util.py#L284

Reads 👍if not no_netrc (so you didnt not specify no_netrc) ❓and not force_user (so you did NOT specify a user) allow netrc.

This means netrc will only work if you DO NOT specify a username (sftp://machine.com) It will not work if you do username (sftp://user@machine.com) because not force_user

Not sure what the intention of this condition is, but it seems that not force_user just creates confusion and seems to work as intended without that condition.

If this is a desired function, can there be a log that is written of why netrc is being skipped?

mar10 commented 2 years ago

It reads 'Try netrc if neither --no-netrc nor --prompt was passed.' (--prompt should force prompting) Do you think there is a bug?