Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Absolute paths used as file names in upload #24

Open
karrots opened this issue Sep 6, 2015 · 2 comments
Open

Absolute paths used as file names in upload #24

karrots opened this issue Sep 6, 2015 · 2 comments

Comments

@karrots
Copy link
Contributor

karrots commented Sep 6, 2015

When passing a file to upload as an absolute path instead of just a filename the filename on the ESP module is the full path on local host.

$ nodemcu-uploader upload --compile /path/to/lua/file/mylua.lua
Remove /path/to/lua/file/mylua.lc
file.remove("/path/to/lua/file/mylua.lc")
stdin:1: filename too long
> 
Transfering scwifi.lua as /path/to/lua/file/mylua.lua
Error waiting for esp "recv()
stdin:1: attempt to call global 'recv' (a nil value)
> "
Compile /path/to/lua/file/mylua.lua
node.compile("/path/to/lua/file/mylua.lua")
stdin:1: filename too long
> 
Remove /path/to/lua/file/mylua.lua
file.remove("/path/to/lua/file/mylua.lua")
stdin:1: filename too long
@kmpm
Copy link
Owner

kmpm commented Nov 14, 2015

Sometimes it's useful to have the path appended to the filename.
There could be things like...

public/index.html
admin/index.html

There could perhaps be an option to strip some levels of the path from the name, much like you can do with the tar command, but I would not like to use the basename only.

@isevcik
Copy link

isevcik commented Dec 6, 2017

This also affects files specified by current dir prefix: ./file.lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants