Comments (8)
I have no strong opinions on this either way, but as the feature tries to emulate scp
/rsync
: In both you can do -r
on single files I think, so allowing this here could lighten the mental load for users of osf-cli
as the behaviour is identical?
from osfclient.
from osfclient.
The thinking with giving an error was that chances are the user made a mistake if they specified -r
and a single file. You think it is worth protecting people from that or outweighed by utility of being able to do what you did?
(Why didn't you do osf upload -r .
? Which I would have expected to work, if not that is a bug IMHO)
from osfclient.
In hindsight, osf upload -r . /
would have worked fine, but I wanted some progress reporting, so the bash for loop was a hack to so I'd know which directory it got stuck on if there were errors (which there were, and which I posted under #74). I guess if progress reporting (ref #93) is working, there will be fewer cases where someone would intentionally use osf upload -r
on a single file. The only case I can think of is in for loops similar to mine, which I could still see people using if they want to upload a subset of the files and directories in a given directory.
I do see your point though, that the -r
with a single file could often mean someone didn't type the directory they actually wanted to upload. With that in mind, and with a -v
option available in the future, I would be fine with this going either way.
from osfclient.
I have no strong opinions on this either way, but as the feature tries to emulate scp/rsync: In both you can do -r on single files I think, so allowing this here could lighten the mental load for users of osf-cli as the behaviour is identical?
I tend to agree with this, especially if the plan is to make recursive uploads more scp-like or rsync-like, i.e. by allowing upload of multiple files or directories in one command instead of just allowing upload of one file or the contents of one directory. If that's not the plan, then maybe there's not much reason to make osf upload
emulate other features of rsync and scp?
from osfclient.
Should be a simple PR to remove the check and update the test. Go for it.
from osfclient.
@benlindsay or @gedankenstuecke are either of you guys interested in creating a PR for this?
from osfclient.
Interested: Yes
Having time: Nope 😢
Sorry, will have to pass on that one.
from osfclient.
Related Issues (20)
- ConnectionError of osf clone HOT 7
- Incorrect error on large files
- During recursive upload subfolder name is changed if it contains parent folder name as substring HOT 1
- Fetch is extremely slow for large repos
- add size atribute to File class
- Add a special exception for responses with 4xx status
- add token option to client HOT 3
- How to backup wiki-pages via osfclient? HOT 1
- upload directory into remote path will create new directory in root
- upload directory into remote folder will create another new folder in root
- KeyError: 'content-length' when cloning from OSF if Github-Add-on is activated HOT 1
- Show progress when uploading
- Unable to upload file into existing folder in OSF storage HOT 6
- Slow indexing of folder tree HOT 1
- transfer completes but `osfclient.cli.upload` hangs
- Folder indexing returns incomplete list of files HOT 3
- Cannot access private project hosted by an institution HOT 4
- RuntimeError: Response has status code 502 not (200,)
- I have ConnectionError when download large dataset.
- RuntimeError status code 500
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from osfclient.