-
Notifications
You must be signed in to change notification settings - Fork 25
add file name rules for desktop #429
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
Merged
Merged
Changes from 2 commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| sidebar_position: 11 | ||
| id: file-names | ||
| title: File Naming Rules | ||
| description: File Naming Rules for OpenCloud Desktop | ||
| draft: true | ||
| --- | ||
|
|
||
| # Filename restrictions on OpenCloud Desktop | ||
|
|
||
| When using the OpenCloud Desktop Client, file and folder names must meet certain operating system (OS) requirements to ensure seamless sync across different platforms. These restrictions are not enforced by OpenCloud but originate from system limitations. | ||
|
|
||
| ## Key Guidelines | ||
|
|
||
| - Avoid using prohibited characters or reserved words in filenames on any OS. | ||
| - If syncing from Linux/macOS to a Windows-based share, make sure filenames are compatible with Windows naming restrictions. | ||
| - To change casing (e.g., `File.txt` → `file.txt`) on Linux/macOS when syncing to Windows, rename the file to a completely new name, let it sync, then rename it to the desired casing. | ||
|
|
||
| ## Common Limitations | ||
|
|
||
| ### a. Maximum Path Length | ||
|
|
||
| Windows limits file paths to 260 characters by default. | ||
| If your sync root exceeds this, the Desktop Client will warn: | ||
| "The path '%1' is too long. Please enable long paths in the Windows settings or choose a different folder." | ||
Svanvith marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| On Windows 10 and later, you can remove this limit by enabling Long Paths. See [Microsoft’s documentation](https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later). | ||
|
|
||
| ### b. Forbidden Characters | ||
|
|
||
| | OS | Forbidden Characters | | ||
| | --------------- | ------------------------------- | ------------ | | ||
| | **Windows** | `<`, `>`, `:`, `"`, `/`, `\`, ` | `, `?`, `\*` | | ||
|
|
||
| ### c. Non-Printable ASCII Characters | ||
|
|
||
| - Linux/macOS: NUL (character code 0) | ||
| - Windows: ASCII 0 – 31 | ||
| While valid on some systems, such characters often cause issues during syncing. | ||
|
|
||
| ### d. Reserved Filenames (Windows) | ||
|
|
||
| Avoid using any of the following as filenames: | ||
| `CON`, `PRN`, `AUX`, `NUL`, `COM1`–`COM9`, `LPT1`–`LPT9` | ||
|
|
||
| ### e. Special Rules | ||
|
|
||
| - On Linux/macOS syncing to SMB, filenames that differ only by case may cause conflicts—rename files clearly to avoid sync failures. | ||
| - Windows: Filenames must not end in a space or period (`.`). | ||
|
|
||
| ## Example | ||
|
|
||
| Creating a file named `example.` or `example.LPT1` on macOS may sync to OpenCloud successfully. However, when accessed via a Windows client, these files may be rejected due to reserved naming or format rules, leading to inconsistent sync behavior across devices. | ||
|
|
||
| ## Summary | ||
|
|
||
| | Restriction Type | Action Item | | ||
| | -------------------- | ------------------------------------------------ | | ||
| | Path Length | Keep paths under ~260 characters unless extended | | ||
| | Forbidden Characters | Remove disallowed characters from names | | ||
| | Control Characters | Avoid non-printable ASCII characters | | ||
| | Reserved Filenames | Do not use Windows reserved names | | ||
| | Case-Only Changes | Rename to a temporary name before syncing | | ||
| | Trailing Characters | Avoid filenames ending in space or period | | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, we only support Windows 10+ so I guess we can rephrase the second part.
Also I assume as long as the sync root is <260 char we are not affected. If the sync root is > 260 chars we would warn "The path '%1' is too long. Please enable long paths in the Windows settings or choose a different folder"
For context.
https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I rewrote it ;) hope it is now better