You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if i call the smb_fopen method with file path of this form: "/test.txt" in read mode on OS X share, i receive a -2 error code (Failed to open file: /test.txt)
yes, the file name is test.txt
ofcource if i have a longer path it will behave the same, for instance:
/folder1/folder2/test.txt
will work only if i will set it to:
folder1/folder2/test.txt
so the working code is: const chat * fileNameAndPath = "folder1/folder2/test.txt"; int openFileResult = smb_fopen(smbSession, shareID, fileNameAndPath, SMB_MOD_RO, &fileDescriptor);
but you need to be able to set path to the root and relate to folder and files from there, this is a bug, every implementation using your (wonderful) lib - removes the leading "/", i don't think this is the way it should be,
hello,
if i call the smb_fopen method with file path of this form: "/test.txt" in read mode on OS X share, i receive a -2 error code (Failed to open file: /test.txt)
failed code sample:
const chat * fileNameAndPath = "/test.txt";
int openFileResult = smb_fopen(smbSession, shareID, fileNameAndPath, SMB_MOD_RO, &fileDescriptor);
but if i remove the first "/" and call it like this:
success code sample:
const chat * fileNameAndPath = "test.txt";
int openFileResult = smb_fopen(smbSession, shareID, fileNameAndPath, SMB_MOD_RO, &fileDescriptor);
if i try this on a windows share it will work both ways!
my end code simply strip the first "/" from all calls (since OS X and Windows can handle it),
i would love it if the bug was found and fixed (or that someone will prove me wrong),
Thanks,
Shay.BC.
The text was updated successfully, but these errors were encountered: