Closed sjurtf closed 1 year ago
Hey, @sjurtf, thanks for the report.
An obvious bug, I am surprised that the tests didn't catch that.
I know you want to keep the folder name hidden, but could you tell us a bit more about how it is structured? Any special characters?
The folder names are generated by encfs. I'm not sure how exactly the encfs algorithm to produce the names are, but I've had no issues with folder names when uploading to Jotta using jotta-upload.
The only special characters I've seen are the more normal ones like ',' and '-'.
So, would you know of a way to reliably trigger this bug? Outside of your own filesystem, I mean.
Tested with a regular named folder called test, in the root of Jotta an the same problem occurs.
Total number of folders to download: 1
INFO:root:topdir: u'https://www.jottacloud.com/jfs/<email>/Jotta/Sync'
DEBUG:root:folder: u'/<user>/Jotta/Sync/test'
DEBUG:root:absolute folder path : u'https://www.jottacloud.com/jfs/<user>/Jotta/Sync/test'
INFO:root:relative folder path: u''
INFO:root:Entering a new folder:
Traceback (most recent call last):
File "/usr/local/bin/jotta-download", line 9, in <module>
load_entry_point('jottalib==0.5.1', 'console_scripts', 'jotta-download')()
File "/usr/local/lib/python2.7/dist-packages/jottalib/cli.py", line 371, in download
os.makedirs(_rel_folder_path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: ''
I just fired up a clean ubuntu live usb and installed newest code from github using +git as source for pip. Used the jottalib source code as example filesystem structure. The same bug with relative path being cut of is there.
Total number of folders to download: 6
INFO:root:topdir: u'/Jotta/Archive'
DEBUG:root:folder: u'/<user>/Jotta/Archive/jottalib-master/src/jottalib'
DEBUG:root:absolute folder path : u'https://www.jottacloud.com/jfs/<user>/Jotta/Archive/jottalib-master/src/jottalib'
INFO:root:relative folder path: u'tacloud.com/jfs/<user>/Jotta/Archive/jottalib-master/src/jottalib'
INFO:root:Entering a new folder: tacloud.com/jfs/<user>/Jotta/Archive/jottalib-master/src/jottalib
I'm running the latest code from the master branch to test the jotta-download function.
When trying to download a folder inside /Jotta/Archive/ I'm having some issues with the relative path used.
As seen in the below debug log the error occurs between the "DEBUG:root:absolute folder path" and INFO:root:relative folder path".
'https://www.jottacloud.com' is being chopped and becomes 'tacloud.com' A folder named 'tacloud.com' is being created in the working directory where jotta-download is launched.
Output from runtime using debug -l