CreateDiskLocation on Mac

Ruslan Zasukhin sunshine at public.kherson.ua
Fri Aug 11 09:07:37 CDT 2006


On 8/11/06 3:51 AM, "Matthew Jew" <mjew at icnc.com> wrote:

Hi Matthew, 
 
> I am using CreateDiskLocation with a full mac/unix style path like this:

----------------------------------------------------------------------
> NSString *dbFilePath = @"/Volumes/NewDL400a/Dest/2006-08-10/PVDayDBs/
> ArticleSearchDB.vdb";

> FBL::I_Location_Ptr pLocation = FBL::CreateDiskLocation( [dbFilePath
> UTF8String] );
> 
> // DEBUG
> FBL::String Msg( pLocation->get_Path() );
>   std::cout << "\tValentinaBaseDBManager::openExistingDatabase
> pLocation.getPath: " << Msg.getBufferA() << "\n";
----------------------------------------------------------------------

> This section of code results in this output:
> 
> ValentinaBaseDBManager::openExistingDatabase pLocation.getPath: /

> Volumes/Alpha2/Dev-NuPV/PVReplicator2/build/Debug/PVReplicator2.app/
> Contents/MacOS//Volumes/NewDL400a/Dest/2006-08-10/PVDayDBs/
> ArticleSearchDB.vdb

So you give absolute path, but location is created for even other volume?
Am I right ?

Aha, I have to see. It consider your paths as single name of database...

Hmm, Must be debugged.

You work, with C++ SDK, built with xcode, gcc, MACHO.
So path must be POSIX. All right....

Well, as workaround for now you can try build disk location from FSSRef
Exist such factor

    CreateDiskLocation_FromFSSRef()

> and the database gets created INSIDE my application bundle. This is
> NOT what I want to have happen.
> Why is CreateDiskLocation concatenating the path like that?
> 
> The file does NOT exist yet when I call CreateDiskLocation, but I
> need to create this disk location before I call Create( pLocation );
> What am I missing?

-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list