abraunegg / onedrive

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

sync_list does not handle space in folders correctly #76

Closed lukaslcf closed 6 years ago

lukaslcf commented 6 years ago

Bug Report Details

Describe the bug Folder with space within it cannot be correctly read in the sync_list file. I have tried to quote the folder name with double quote or single quote, but none of them works. I also tried to escape the space with \ but it does not work either.

Application and Operating System Details:

To Reproduce

  1. Create a directory with directory name that have space within it
  2. Sync it to onedrive using onedrive --synchronize
  3. Create the sync_list file in ~/.config/onedrive/
  4. Write the directory name with space into the sync_list file
  5. Create a new file inside that folder
  6. Resync with onedrive --synchronize --resync --verbose
  7. Observe that the folder is being skipped

Complete Verbose Log Output

Loading config ...
Using Config Dir: /home/lukas/.config/onedrive
No config file found, using defaults
Deleting the saved status ...
Initializing the OneDrive API ...
Opening the item database ...
All operations will be performed in: /home/lukas/OneDrive
Initializing the Synchronization Engine ...
Account Type: business
Default Drive ID: b!jCjv0hcsgEmHUJETxe-gCAL_1ZNfaopIuzhJ1cZSCYGoWreP6XJTQZDXKoLU-c0S
Default Root ID: 01QVAPQ456Y2GOVW7725BZO354PWSELRRZ
Remaining Free Space: 5438129999337
Fetching details for OneDrive Root
OneDrive Root does not exist in the database. We need to add it.
Added OneDrive Root to the local database
Syncing changes from OneDrive ...
Applying changes of Path ID: 01QVAPQ456Y2GOVW7725BZO354PWSELRRZ
This item type (Lok @ OneDrive - Imperial College London) is not supported
This item type (Lok @ Imperial College London) is not supported
Uploading differences of .
Processing root
The directory has not changed
Processing Blender
The directory has not changed
Processing Donut with sprinkles with lighting2.png
The file has not changed
Processing pyanIjx.jpg
The file has not changed
Processing anvil.blend1
The file has not changed
Processing $_20 (6).JPG
The file has not changed
Processing ITbt3.jpg
The file has not changed
Processing b1dd0f90d5fd501e3d7764b07aed5a17.jpg
The file has not changed
Processing P17BH6h.jpg
The file has not changed
Processing po4qzDb.jpg
The file has not changed
Processing e9c3cf8ccfbf7f05d9ebe98e052a9c42.jpg
The file has not changed
Processing MetalSpottyDiscoloration001_COL_1K_METALNESS.jpg
The file has not changed
Processing 20RPcoj.jpg
The file has not changed
Processing $_20 (2).JPG
The file has not changed
Processing anvil-1085407.jpg
The file has not changed
Processing anvil-416186.jpg
The file has not changed
Processing christmas light.blend1
The file has not changed
Processing Donut with sprinkles with lighting1.png
The file has not changed
Processing WoodFine26_NRM_1K.jpg
The file has not changed
Processing $_20 (1).JPG
The file has not changed
Processing $_20 (5).JPG
The file has not changed
Processing 514723784.jpg
The file has not changed
Processing aspen-dinner-plate.jpg
The file has not changed
Processing 4Vog8Lr.jpg
The file has not changed
Processing Donut with sprinkles with neon.png
The file has not changed
Processing $_20 (3).JPG
The file has not changed
Processing SgtTT1P.jpg
The file has not changed
Processing WoodFine26_COL_1K.jpg
The file has not changed
Processing steel-anvil.jpg
The file has not changed
Processing gP45gcG.jpg
The file has not changed
Processing JHM Certifier Anvil Horn.jpg
The file has not changed
Processing $_20.JPG
The file has not changed
Processing anvil.blend
The file has not changed
Processing Reference.zip
The file has not changed
Processing $_20 (4).JPG
The file has not changed
Processing fisher-140-dressed-small.png
The file has not changed
Processing 1758.jpg
The file has not changed
Processing Dounut.blend1
The file has not changed
Processing maxresdefault.jpg
The file has not changed
Processing Dounut.blend
The file has not changed
Processing christmas background.png
The file has not changed
Processing Donut with sprinkles with lighting.png
The file has not changed
Processing ZExnJrz.jpg
The file has not changed
Processing Donut with sprinkles.png
The file has not changed
Processing s-l1600.jpg
The file has not changed
Processing christmas light.blend
The file has not changed
Processing Blender_Cheat_Sheet.pdf
The file has not changed
Processing Textbooks
The directory has not changed
Processing cambridge-core_introduction-to-the-high-temperature-oxidation-of-metals_16Nov2017
The directory has not changed
Processing Protective_coatings.pdf
The file has not changed
Processing Methods_of_investigation.pdf
The file has not changed
Processing Oxidation_in_oxidants_other_than_oxygen.pdf
The file has not changed
Processing Reactions_of_metals_in_mixed_environments.pdf
The file has not changed
Processing Introduction.pdf
The file has not changed
Processing Mechanisms_of_oxidation.pdf
The file has not changed
Processing Contents.pdf
The file has not changed
Processing Hot_corrosion.pdf
The file has not changed
Processing Effects_of_impurities_on_oxide_defect_structures.pdf
The file has not changed
Processing Oxidation_of_alloys.pdf
The file has not changed
Processing Solution_to_Ficks_second_law_for_a_semi-infinite_solid.pdf
The file has not changed
Processing Erosioncorrosion_of_metals_in_oxidizing_atmospheres.pdf
The file has not changed
Processing Atmosphere_control_for_the_protection_of_metals_during_production_processes.pdf
The file has not changed
Processing Index.pdf
The file has not changed
Processing Thermodynamic_fundamentals.pdf
The file has not changed
Processing Oxidation_of_pure_metals.pdf
The file has not changed
Processing Preface.pdf
The file has not changed
Processing Acknowledgements.pdf
The file has not changed
Processing Rigorous_derivation_of_the_kinetics_of_internal_oxidation.pdf
The file has not changed
Processing Frontmatter.pdf
The file has not changed
Processing Mathematical methods for physics and engineering.pdf
The file has not changed
Processing Seminar-Phenomenology02.pptx
The file has not changed
Processing Materials Science and Engineering An Introduction,9th Edition.pdf
The file has not changed
Processing GAS Turbine Combustion Alternative Fuels and Emissions.pdf
The file has not changed
Processing gdb.pdf.gz
The file has not changed
Processing C++
The directory has not changed
Processing Lecture2.pdf
The file has not changed
Processing Lecture1.pdf
The file has not changed
Processing Lecture4.pdf
The file has not changed
Processing Lecture3.pdf
The file has not changed
Processing dynamical systems in neuroscience.pdf
The file has not changed
Processing cambridge-core_introduction-to-the-high-temperature-oxidation-of-metals_16Nov2017.zip
The file has not changed
Processing Networks.zip
The file has not changed
Processing C.zip
The file has not changed
Processing ODBA
The directory has not changed
Processing hctsa-manual.pdf
The file has not changed
Processing Materials Science and Engineering an Introduction 8th Edition (1).pdf
The file has not changed
Processing koman-12.pdf
The file has not changed
Processing Student Solutions for Mathematical methods for physics and engineering.pdf
The file has not changed
Processing Minna No Nihongo I - Choukai.pdf
The file has not changed
Processing Japanese Textbook.zip
The file has not changed
Processing Atkins_Physical_Chemistry_8th_Edition_-.pdf
The file has not changed
Processing machine-learning-python.pdf
The file has not changed
Processing CXX
The directory has not changed
Processing ProgrammingPearls2nd.pdf
The file has not changed
Processing The Art of Computer Programming - Vol 1.pdf
The file has not changed
Processing CplusplusConcurrencyInAction_PracticalMultithreading.pdf
The file has not changed
Processing Data Structure And Algorithms In C++ 2nd ed - Adam Drozdek.pdf
The file has not changed
Processing Mastering the C++17 STL.pdf
The file has not changed
Processing Addison-Wesley - Modern C++ Design. Generic Programming and Design Patterns Applied.pdf
The file has not changed
Processing Stroustrup - CppCon 2015 keynote.pdf
The file has not changed
Processing Vol,3 SortingAndSearching-Donald Knuth.pdf
The file has not changed
Processing cpp_book-master.zip
The file has not changed
Processing MoreEC++_only.pdf
The file has not changed
Processing Efective STL - 50 way - Scott.pdf
The file has not changed
Processing Addison Wesley - The C++ standard library_a tutorial and reference.pdf
The file has not changed
Processing README.md
The file has not changed
Processing C++17 STL Cookbook.pdf
The file has not changed
Processing Modern C++ Design .pdf
The file has not changed
Processing Discovering Modern C++ - Peter Gottschling.pdf
The file has not changed
Processing Vol. 2 SemiNumericalAlgorithms-Donald Knuth.pdf
The file has not changed
Processing Vol. 1 FundamentalAlgorithm-Donald Knuth.pdf
The file has not changed
Processing Concurrency in CPP.pdf
The file has not changed
Processing clean_code.pdf
The file has not changed
Processing Addison_Wesley_-_Modern_C++_Design_Generic_Programming_and_Design_Patterns_Applied_Ebook-fly.pdf
The file has not changed
Processing Numerical_Recipes.pdf
The file has not changed
Processing cpp11-14NotesSample.pdf
The file has not changed
Processing C++ Primer Plus (5th Edition).pdf
The file has not changed
Processing Programming Interviews Exposed.PDF
The file has not changed
Processing [Pearson] - Algorithms, 4th ed. - [Sedgewick, Wayne].pdf
The file has not changed
Processing Optimized-C++.pdf
The file has not changed
Processing The_Art_of_Computer_Programming - Vol 1.pdf
The file has not changed
Processing Interview_Programming_pearls.pdf
The file has not changed
Processing Straustrup4th.pdf
The file has not changed
Processing _c___in-depth_series__bjarne_stroustrup-a_tour_of_c__-addison-wesley_professional__2013_.pdf
The file has not changed
Processing effective stl.pdf
The file has not changed
Processing Deitel-C_ How to Program.pdf
The file has not changed
Processing More Exceptional CPP.pdf
The file has not changed
Processing Effective+Modern+C++.pdf
The file has not changed
Processing C++ Programming. From Problem Analysis to Program Design (6th Edition).pdf
The file has not changed
Processing cpp guide line.pdf
The file has not changed
Processing Addison.Wesley.Effective.CPP.3rd.Edition.May.2005.pdf
The file has not changed
Processing CPP Coding standard.pdf
The file has not changed
Processing Exceptional_C_Plus_Plus_47_Engineering_Puzzles_Programming_Problems_and_Solutions_Herb_Sutter(www.ebook-dl.com).pdf
The file has not changed
Processing H.Schildt.Cpp.The.Complete.Reference.4th.Edition.ENG.pdf
The file has not changed
Processing Code Complete.2.Edition.pdf
The file has not changed
Processing The_Art_Of_Multi_Core.pdf
The file has not changed
Processing Andrew-Koening-and-Barbara-E.-Moo-Accelerated-C++.pdf
The file has not changed
Processing Scott Meyers - Overview of the New CPP Apr 2011.pdf
The file has not changed
Processing gdb.pdf
The file has not changed
Processing combined intel softward developer manual.pdf
The file has not changed
Processing Getting started with MatLab 2009.pdf
The file has not changed
Processing Codes
The directory has not changed
Processing VideoFaceRecognition
The directory has not changed
Processing opencv
The directory has not changed
Processing sources
The directory has not changed
Processing modules
The directory has not changed
Processing cudalegacy
The directory has not changed
Processing test
The directory has not changed
Processing TestHypothesesGrow.cpp
The file has not changed
Uploading new items of .
Skipping item - path excluded: ./Japanese oral exam.docx
Skipping item - path excluded: ./Email attachments
Skipping item - path excluded: ./2015.70073.Artists-Handbook-Of-Materials-And-Techniques.pdf
Skipping item - path excluded: ./bike.tar.gz
Skipping item - path excluded: ./Cinema Soc
Skipping item - path excluded: ./Attachments
Skipping item - path excluded: ./Robogals
Skipping item - path excluded: ./ICPASS
Skipping item - path excluded: ./Year 2
Skipping item - path excluded: ./MSE 106 Presentation.pptx
Applying changes of Path ID: 01QVAPQ456Y2GOVW7725BZO354PWSELRRZ

sync_list content

Blender
"Cinema Soc"
Codes
Textbooks
"Year 2" 

Bug Report Checklist

abraunegg commented 6 years ago

Thanks for the bug report. Will look into this folders with spaces are fully supported when using the client - so it certainly looks like something is not right with the sync_list handling of the same.

robertjf commented 6 years ago

Assign it to me if you like and I’ll get onto it this week

abraunegg commented 6 years ago

Thanks - greatly appreciated :)

abraunegg commented 6 years ago

@robertjf Any update as to looking at this issue?

robertjf commented 6 years ago

sorry for the delay; looking at it today.

robertjf commented 6 years ago

there should be no quotes, escaping or any other attempt to "massage" the directory path - just type it as you see it. For example, instead of "Cinema Soc" just use Cinema Soc

dlang's buildNormalizedPath method will be able to cope with the spaces without any special treatment, and if you add any quotes at all it will return a negative on the match.

@LegendLukaz can you please update your sync_list and remove the quotes and try again?

lukaslcf commented 6 years ago

@robertjf the sync_list worked after removing the quotes. Thank you very much for the help!

abraunegg commented 6 years ago

Updated readme.md with examples of files / folders with spaces in them for clarity.

lock[bot] commented 5 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.