Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chscott opened this issue Jun 14, 2024 · 4 comments
Labels
enhancement Remote: One Drive Support Contract Issues made for customers with support contracts

Comments

@chscott
Copy link

chscott commented Jun 14, 2024

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 chscott added the Support Contract Issues made for customers with support contracts label Jun 14, 2024
@ncw
Copy link
Member

ncw commented Jun 14, 2024

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

@ncw ncw changed the title Option to automatically rename folders instead of throwing 'invalidRequest: Name is reserved for list forms folder' error onedrive: Option to automatically rename folders instead of throwing 'invalidRequest: Name is reserved for list forms folder' error Jun 14, 2024
@ncw
Copy link
Member

ncw commented Jun 14, 2024

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

@chscott
Copy link
Author

chscott commented Jun 14, 2024

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.

@DipanshuHandoo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Remote: One Drive Support Contract Issues made for customers with support contracts
Projects
None yet
Development

No branches or pull requests

3 participants