diff --git a/examples/sftp/src/main.rs b/examples/sftp/src/main.rs index 084bbd7..a2d7a26 100644 --- a/examples/sftp/src/main.rs +++ b/examples/sftp/src/main.rs @@ -251,6 +251,7 @@ impl SyncFilter for Filter { .unlink(path) .map_err(|_| CloudErrorKind::InvalidRequest)?, } + ticket.pass().unwrap(); Ok(()) }(); @@ -297,6 +298,7 @@ impl SyncFilter for Filter { })) .map_err(|_| CloudErrorKind::InvalidRequest)?, } + ticket.pass().unwrap(); Ok(()) }(); diff --git a/src/command/commands.rs b/src/command/commands.rs index d012670..316dbf0 100644 --- a/src/command/commands.rs +++ b/src/command/commands.rs @@ -1,4 +1,4 @@ -use std::{ops::Range, ptr, slice}; +use std::{iter, ops::Range, ptr, slice}; use windows::{ core, @@ -165,6 +165,10 @@ impl Command for CreatePlaceholders<'_> { unsafe fn result(info: CF_OPERATION_PARAMETERS_0) -> Self::Result { // iterate over the placeholders and return, in a new vector, whether or // not they were created with their new USN + if info.TransferPlaceholders.PlaceholderCount == 0 { + return vec![]; + } + slice::from_raw_parts( info.TransferPlaceholders.PlaceholderArray, info.TransferPlaceholders.PlaceholderCount as usize,