Run check.sh
This commit is contained in:
parent
18be9f4dd8
commit
7008c54e2e
4 changed files with 653 additions and 6 deletions
|
|
@ -22,8 +22,8 @@ use crate::{
|
|||
errors::{SyncServerError, not_found_error, server_error},
|
||||
server::requests::UpdateBinaryDocumentVersion,
|
||||
utils::{
|
||||
dedup_paths::dedup_paths, find_first_available_path::find_first_available_path,
|
||||
is_binary::is_binary, is_file_type_mergable::is_file_type_mergable, normalize::normalize,
|
||||
find_first_available_path::find_first_available_path, is_binary::is_binary,
|
||||
is_file_type_mergable::is_file_type_mergable, normalize::normalize,
|
||||
sanitize_path::sanitize_path,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -9,9 +9,9 @@ pub async fn find_first_available_path(
|
|||
transaction: &mut Transaction<'_>,
|
||||
) -> Result<String> {
|
||||
let mut new_relative_path = String::default();
|
||||
for candidate in dedup_paths(&sanitized_relative_path) {
|
||||
for candidate in dedup_paths(sanitized_relative_path) {
|
||||
if database
|
||||
.get_latest_document_by_path(&vault_id, &candidate, Some(transaction))
|
||||
.get_latest_document_by_path(vault_id, &candidate, Some(transaction))
|
||||
.await?
|
||||
.is_none()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue