Skip to content

smb_file_mv seems not working #98

@DemianSteelstone

Description

@DemianSteelstone

Hi,
I'm trying to use your lib in my ios project
But have some troubles with move operation.

My code example:

smb_session *session = smb_session_new();
smb_session_connect(session, hostName, addr.s_addr, SMB_TRANSPORT_TCP);
smb_session_set_creds(session, hostName, userName, password);

smb_tid treeID;
NSString *shareName = [self.path shareName];
const char *shareCString = [shareName cStringUsingEncoding:NSUTF8StringEncoding];
smb_tree_connect(self.smbSession, shareCString, &treeID);

NSString *srcPath = [self.path formattedFilePath];  // path like "\\myfolder\\\\file.txt"
NSString *dstPath = [[dst stringByTrimmingCharactersInSet:trimSet] slashesEscape]; // "\\mysharename\\\\myfolder\\\\file2.txt"
    
int result = smb_file_mv(self.smbSession,self.treeID,srcPath.UTF8String,dstPath.UTF8String);

and now I got "result == -3"

Maybe I'm doing something wrong?

Other operations like create folder or remove works perfectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions