Skip to content

Upload is trying to save some files as their parent directory #589

@billyJoePiano

Description

@billyJoePiano

I am having an issue where I'm trying to upload a large directory using this script. Sometimes the files have a local path which looks something like this:

/mnt/usb/MainDir/subdir/myFile1.jpg
/mnt/usb/MainDir/subdir/myFile2.jpg
etc...

but the script attempts to upload all of the files as:

/MainDir/subdir

When it should be
/MainDir/subdir/File1.jpg
/MainDir/subdir/File2.jpg
etc...

When this happens, the first file gets uploaded as the name of the directory, and the subsequent files all fail to upload.

The issue is sporadic, and the subdirectories which cause problems seem to change every time I run it. It seems to happen both in the top-level directory (like this example), and in nested subdirectories of subdirectories.

Note that I am using the -s switch, to skip files that have already been uploaded. I don't know if that is related to the problem. Also, I am running this on FreeBSD 13.2 (as installed by pkg install dropbox-uploader) and had to make a small modification to the script to force curl to use http1.1 -- it was defaulting to http 2 which was causing other issues with the script. Specifically, the change was on line 142, setting variable CURL_BIN="curl --http1.1". Again, I don't know if this is related to the issue, but it seems like it is something else with how the script is recursing through subdirectories and files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions