rclone icon indicating copy to clipboard operation
rclone copied to clipboard

onedrive: Option to automatically rename folders instead of throwing 'invalidRequest: Name is reserved for list forms folder' error

Open chscott opened this issue 1 year ago • 4 comments

The associated forum post URL from https://forum.rclone.org

N/A

What is the problem you are having with rclone?

Failed to copy: failed to make directory: invalidRequest: Name is reserved for list forms folder

This error occurs when attempting to create a path part with forms in it. Case does not seem to matter. For example:

Forms/Office Misc/Other Misc/TAX EXEMPT.PDF

We're hoping we can get an option that will allow automatically renaming such path parts. Instead of the above path, perhaps something like this:

_Forms/Office Misc/Other Misc/TAX EXEMPT.PDF

What is your rclone version (output from rclone version)

rclone v1.67.0-beta.7971.181ed5566
- os/version: Microsoft Windows 11 Pro 23H2 (64 bit)
- os/kernel: 10.0.22631.3737 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.22.3
- go/linking: static
- go/tags: cmount

Which OS you are using and how many bits (e.g. Windows 7, 64 bit)

Windows, 64 bit

Which cloud storage system are you using? (e.g. Google Drive)

OneDrive

The command you were trying to run (e.g. rclone copy /tmp remote:tmp)

rclone copy Source: Target:

A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)

Available on request, though I think this is pretty straightforward.

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

chscott avatar Jun 14 '24 03:06 chscott

Heads up @rclone/support - the "Support Contract" label was applied to this issue.

ncw avatar Jun 14 '24 03:06 ncw

This came up on the forum

A bit more research from a onedrive API bug report indicates you should be able to create folders called Forms just not in the root.

So creating a folder called Forms fails in the root

$ rclone -vv --retries 1 mkdir onedriveb:Forms
2024/06/14 11:27:01 DEBUG : rclone: Version "v1.67.0-DEV" starting with parameters ["rclone" "-vv" "--retries" "1" "mkdir" "onedriveb:Forms"]
2024/06/14 11:27:01 DEBUG : Creating backend with remote "onedriveb:Forms"
2024/06/14 11:27:01 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2024/06/14 11:27:02 DEBUG : OneDrive root 'Forms': Making directory
2024/06/14 11:27:03 ERROR : Attempt 1/1 failed with 1 errors and: failed to make directory: invalidRequest: Name is reserved for list forms folder.
2024/06/14 11:27:03 DEBUG : 6 go routines active
2024/06/14 11:27:03 Failed to mkdir: failed to make directory: invalidRequest: Name is reserved for list forms folder.

But succeeds in a sub directory

$ rclone -vv --retries 1 mkdir onedriveb:subdir/Forms
2024/06/14 11:27:13 DEBUG : rclone: Version "v1.67.0-DEV" starting with parameters ["rclone" "-vv" "--retries" "1" "mkdir" "onedriveb:subdir/Forms"]
2024/06/14 11:27:13 DEBUG : Creating backend with remote "onedriveb:subdir/Forms"
2024/06/14 11:27:13 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2024/06/14 11:27:14 DEBUG : OneDrive root 'subdir/Forms': Making directory
2024/06/14 11:27:15 DEBUG : 6 go routines active

Does that help? Is it possible to not put the Forms directory in the root?

It would be possible for rclone to map the Forms directory to (say) Forms_ in the root. This means it would appear as Forms but actually be stored as Forms_ on sharepoint. This is similar to the way the file encoding works

ncw avatar Jun 14 '24 10:06 ncw

I don't think that will help in our use case. We don't know what we're going to find in the source ahead of time and would need to coordinate with end users to ask them if we can selectively target such folders and map them to a different location in the target, at which point we'd probably just ask them to rename the folder in the source to avoid the problem. The option to map Forms to Forms_ should work for our case.

chscott avatar Jun 14 '24 14:06 chscott

Can this not be fixed permanently? It is not possible every time to do this mapping.

DipanshuHandoo avatar Jun 25 '24 10:06 DipanshuHandoo