abraunegg / onedrive

OneDrive Client for Linux
https://abraunegg.github.io
GNU General Public License v3.0
9.87k stars 855 forks source link

How to properly ignore certain .folders like .git ? #1596

Closed xmoiduts closed 3 years ago

xmoiduts commented 3 years ago

Note: Before submitting a bug report, please ensure you are running the latest 'onedrive' client as built from 'master' and by using the latest available DMD compiler. Refer to the readme on building the client for your system.

Bug Report Details

Describe the bug I have a git-tracked project folder to sync, but I don't want to download .git repo from the onedrive cloud since it often distrubs the repo (namely: get hostname added to file name). As I configured sync_dir and sync_list, the .git/ folder still get downloaded where it shouldn't. I know there is a "skip all dotfiles" method, however similar function should also be able be implemented by editing sync_list properly.

I'm interested to know how to properly write the sync_list file to avoid syncing folders like .git and __pycache__. .git is located in certain folders that human can enumerate, */__pycache__/* is scattered in many folders that have python source code.

Application and Operating System Details: Everything unspecified is the same as #1526 .

Complete Verbose Log Output A clear and full log of the problem when running the application in the following manner (ie, not in monitor mode):

onedrive --synchronize --verbose <any of your other needed options>
 **Note the .git - related outputs**
Processing 276 OneDrive items to ensure consistent local state due to sync_list being used                          
Skipping item - excluded by sync_list config: Codes/kedamadiff-proj/KedamaDiff2                                     
Skipping item - excluded by sync_list config: Codes/kedamadiff-proj/KedamaDiff-Dev                                  
Skipping item - excluded by sync_list config: Codes/kedamadiff-proj/kediff-deployer                                 
Creating local directory: Codes/kedamadiff-proj/KedamaDiff                                                          
Downloading file Codes/kedamadiff-proj/KedamaDiff/syncer.py ... done.                                               
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/tool                                                     
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/util                                                     
Downloading file Codes/kedamadiff-proj/KedamaDiff/readme.md ... done.                                               
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git                                                     
Downloading file Codes/kedamadiff-proj/KedamaDiff/tool/json-to-sqlite.py ... done.                                  
Downloading file Codes/kedamadiff-proj/KedamaDiff/util/update_history_DBConn.py ... done.                           
Downloading file Codes/kedamadiff-proj/KedamaDiff/util/file_operator.py ... done.                                   
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/util/__pycache__                                         
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects                                             
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/01                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/0a                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/12                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/20                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/25                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/21                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/26                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/35                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/2e                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/3a                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/3e                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/6e                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/83                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/88                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/81                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/91                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/9d                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/ae                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/af                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/b1                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/b3                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/b6                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/d9                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/d1                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/e0                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/ef                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/f9                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/69                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/fb                                          
Downloading file Codes/kedamadiff-proj/KedamaDiff/util/__pycache__/update_history_DBConn.cpython-37.pyc ... done.   
Downloading file Codes/kedamadiff-proj/KedamaDiff/util/__pycache__/file_operator.cpython-37.pyc ... done.           
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/e6                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/8e                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/9b                                          
Creating local directory: Codes/kedamadiff-proj/KedamaDiff/.git/objects/5e                                          
Downloading file Codes/kedamadiff-proj/KedamaDiff/.git/objects/01/561f634ed23593d99dd607d49e76654723fc8e ... done.  
Downloading file Codes/kedamadiff-proj/KedamaDiff/.git/objects/0a/c1690c726136d02d9a63b5cbf8d02545c807f5 ... done.  
Downloading file Codes/kedamadiff-proj/KedamaDiff/.git/objects/12/7a430ff56533874fa30e0f50994e36eed17d75 ... ^C     

Run the application in a separate terminal window or SSH session and provide the entire application output including the error & crash. When posing the logs, Please format log output to make it easier to read. See https://guides.github.com/features/mastering-markdown/ for more details.

Application Log Output:

Verbose console log output goes here

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Bug Report Checklist

abraunegg commented 3 years ago

@xmoiduts Have you seen this: https://github.com/abraunegg/onedrive/blob/master/docs/USAGE.md#skip_dir ?

abraunegg commented 3 years ago

@xmoiduts Closing issue, as question answered. Also, in future please follow the correct support process as detailed here:

https://github.com/abraunegg/onedrive#have-a-question https://github.com/abraunegg/onedrive#reporting-an-issue-or-bug