Comments (10)
Thanks @haoadoresorange for your effort, unfortunately I didn't had the time to investigate the case of
**
further. I will do my best to explore ways to support**
. My first thought was to find a way to support**
in order to support.gitignore
file patterns directly but this seems to be tricky.
Hi actually stopped using dropboxignore a while ago ): I switched to insync which allow an ignore file for dropbox and other services.
from dropboxignore.
Hello @haoadoresorange
Yep, I just checked this and it seems to work fine:
➜ ~ mkdir tmp-folder
➜ ~ touch tmp-folder/tmp.txt
➜ ~ mkdir tmp-folder/tmp-folder2
➜ ~ tree tmp-folder
tmp-folder
├── tmp-folder2
└── tmp.txt
1 directory, 1 file
➜ ~ echo '**' > tmp-folder/.dropboxignore
➜ ~ cd tmp-folder
➜ tmp-folder tree .
.
├── tmp-folder2
└── tmp.txt
1 directory, 1 file
➜ tmp-folder dropboxignore ignore .
Total number of ignored files: 2
Total number of ignored folders: 2
There is probably and issue on file counting but the files are ignored from dropbox.
from dropboxignore.
Even a 1-level-sub-folder is not working, do you any idea what is the problem ? I might look into that
from dropboxignore.
any news @sp1thas ?
from dropboxignore.
Hello @haoadoresorange ,
you are right, based on current implementation, double asterisks are not supported. On the other hand, a recursive match is enabled by mistakes, therefore, abc
is equal to **/abc
and this is totally wrong. .gitignore
files don't work in this way and .dropboxignore
files should not work in this way too. dropboxignore uses find
to match files, therefore, -max-depth
should be used to prevent recursive matches.
I will start working on this asap in order to fix the wrong recursive matching and to support patterns like **/abc
, abc/**
, etc.
Thanks for your feedback.
from dropboxignore.
So I looked into it a bit and see that we have a very simple solution here:
- instead of using dirname and basename, we use regex to capture it instead in order to conserve the glob pattern (or maybe there is an option for that).
- now if the dirname part contains any glob pattern AND not for the file in current dir (because
find ./*.extension
doesn't work), we directly usefind
for the whole path asfind /path/with/glob
withglobstar
option enabled. - otherwise we
find
as normal with-maxdepth 1
.
Tell me if it covers everything, I will make a PR.
from dropboxignore.
@haoadoresorange I totally agree about the second and the third bullet of you comment. It's not really clear to me how we gonna use -regex
. Could you provide an example with find -regex ...
that could be used in our case?
note 1: we must keep the format of .dropboxignore
as similar as posible to .gitignore
format.
note 2: I came across this bash implementation and it seems quite promising (not tested yet).
from dropboxignore.
I just tested it, it isn't working (I think), because of one line that seems pretty weird
xargs -n1 find . -type d -name .git -prune -o -type f -path
overall however, I think the script does what you did in your script already.
the regex can be something simple like this (.*)\/(.+)
EDIT: what I mean by using regex is not to use regex with find
, but to break the path down using regex and then look into the path to decide what to do with it.
EDIT2: once we know what to do with just find
using the path
from dropboxignore.
Hi, this is a really nice utility to have and thank you very much for sharing it !
I can confirm that **
patterns are not picked up, but the search is recursive by default. In addition, I also get an auto-ignore for:
- The folder
.../Dropbox/.dropbox.cache/
Vault.dbx-vault
Is this intentional? I don't know what these files and folders do and I am wondering if it is safe to auto-ignore them. If so, it would be nice to have that in the documentation so totally clueless folk like me are not caught unawares!
from dropboxignore.
Thanks @haoadoresorange for your effort, unfortunately I didn't had the time to investigate the case of **
further. I will do my best to explore ways to support **
. My first thought was to find a way to support **
in order to support .gitignore
file patterns directly but this seems to be tricky.
@smalltimer thank you so much for your feedback. dropboxignore should not auto-ignore anything, therefore I would like to ask you to provide a reproducible example of your case. Please provide some the basic folder structure, the current directory, the content of the .dropboxignore
(if exists), the actual command (using --debug
) and the standard output. Given that the this issue is not related to **
I'm encourage you to open a new issue.
from dropboxignore.
Related Issues (19)
- Dropbox ignores the .dropignore file HOT 9
- Doesn't work on MacMini HOT 5
- Command with relative path doesn't work on my Ubuntu 20.04 HOT 3
- `dropboxignore update` broken
- except pattern is ignored HOT 1
- Support Windows HOT 8
- Can't ignore folders HOT 2
- Broken on later versions of OS X
- README: Please provide some details about the .dropboxignore file HOT 2
- Run tests using multiple github runners HOT 3
- Except pattern is not honored HOT 4
- Rather than deleting, use the attr functionality now available with dropbox HOT 1
- Installation script should not use wget as a default way to retrieve the dropboxingore HOT 1
- Junk characters in CLI output HOT 2
- realpath illegal option on macOS 13 HOT 3
- Upgrade codecov
- Skip Coverage Report pipeline step on macos-12
- Improve help message HOT 1
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 dropboxignore.