From 13a35795be681859fa0766a7bbbbba5818a39d5f Mon Sep 17 00:00:00 2001 From: Zack Scholl Date: Mon, 23 Apr 2018 23:42:46 -0700 Subject: [PATCH] Fix windows bug that adds .\ to filename when its .\X --- README.md | 6 ++---- connect.go | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1ae1b6e3..65547ac8 100644 --- a/README.md +++ b/README.md @@ -8,13 +8,11 @@ Go Report Card

-

Secure transfer of stuff from one side of the internet to the other.

+

Easily and securely transfer stuff from one computer to another.

This is more or less (but mostly *less*) a Golang port of [@warner's](https://github.com/warner) [*magic-wormhole*](https://github.com/warner/magic-wormhole) which allows you to directly transfer files and folders between computers. I decided to make this because I wanted to send my friend Jessie a file using *magic-wormhole* and when I told Jessie how to install the dependencies she made this face: :sob:. So, nominally, *croc* does the same thing (encrypted file transfer directly between computers) without dependencies so you can just double-click on your computer, even if you use Windows. -**Don't we have enough open-source peer-to-peer file-transfer utilities?** - -[There](https://github.com/cowbell/sharedrop) [are](https://github.com/webtorrent/instant.io) [great](https://github.com/kern/filepizza) [tools](https://github.com/warner/magic-wormhole) [that](https://github.com/zerotier/toss) [already](https://github.com/ipfs/go-ipfs) [do](https://github.com/zerotier/toss) [this](https://github.com/nils-werner/zget). But, no we don't, because after review, [I found it was useful to make a new one](https://schollz.github.io/sending-a-file/). +Don't we have enough open-source peer-to-peer file-transfer utilities? [There](https://github.com/cowbell/sharedrop) [are](https://github.com/webtorrent/instant.io) [great](https://github.com/kern/filepizza) [tools](https://github.com/warner/magic-wormhole) [that](https://github.com/zerotier/toss) [already](https://github.com/ipfs/go-ipfs) [do](https://github.com/zerotier/toss) [this](https://github.com/nils-werner/zget). But, no we don't, because after review, [I found it was useful to make a new one](https://schollz.github.io/sending-a-file/). # Example diff --git a/connect.go b/connect.go index 18b587f0..a1d33d20 100644 --- a/connect.go +++ b/connect.go @@ -121,7 +121,7 @@ func NewConnection(config *AppConfig) (*Connection, error) { // we set the value IsDir to true c.File.IsDir = true } - c.File.Name = path.Base(config.File) + c.File.Name = path.Base(info.Name()) c.File.Path = path.Dir(config.File) c.IsSender = true } else {