n0-computer / sendme

A tool to send files and directories, based on iroh
Other
96 stars 6 forks source link

`sendme send .` causes silent exit without error message #43

Open stackinspector opened 3 months ago

stackinspector commented 3 months ago

sending current directory will cause a file occupied error while iterating to the db file that just created, and any errors will cause the program to exit silently. In my opinion, an ad-hoc tool can show its raw errors regardless of whether the user can read them or not, but it can't ignore them and exit silently! The current approach is tantamount to unwraping on every Results and setting panic behavior to abort!

stackinspector commented 3 months ago

This problem could only be found on Windows due to the different policies for handling file locks between Windows and Linux/macOS.

stackinspector commented 3 months ago

I was wrong. unwrap-then-abort leaves error message at least.

matheus23 commented 3 months ago

Agreed. This should be better. What would you expect sendme send . to do? Error out or ignore the data directory that contains the blobs.db?

jerzydziewierz commented 2 months ago

IMHO, I would expect it to ignore it's own, sendme related files, but attempt to send everything else; possibly also ignore dot-prefixed files and directories, and also ignore files as per .gitignore