wxCommander Forum
Welcome, Guest. Please login or register.
September 05, 2010, 10:17:20 pm

Login with username, password and session length
Search:     Advanced search
Automatic forum registration is currently disabled due to spam problems.
To register please email username and password to
http://contact.wxcommander.com
232 Posts in 68 Topics by 11 Members
Latest Member: fireclown
* Home Help Login Register
+  wxCommander Forum
|-+  User forums
| |-+  Bugs and problems
| | |-+  First impressions (and some bugs)
« previous next »
Pages: 1 [2] Print
Author Topic: First impressions (and some bugs)  (Read 629 times)
troels
Administrator
Full Member
*****
Posts: 125


WWW
Re: First impressions (and some bugs)
« Reply #15 on: November 29, 2008, 11:44:47 pm »

wxc do this not in the install job but on every startup:

if (!direxists(plugindir))
   mkdir(plugindir);

Unsure how to proceed  Huh
Logged

fireclown
Newbie
*
Posts: 12


Re: First impressions (and some bugs)
« Reply #16 on: December 02, 2008, 08:23:47 am »

mkdir() is a POSIX API. I have always been a bit leary of Windows' support for those APIs. I would try something like this:

#if defined(WIN32_OR_WHATEVER_YOU_USE_TO_DISTINGUISH_WINDOWS_CODE)
# define wxcmkdir(P) CreateDirectory((P), NULL)
#else
# define wxcmkdir(P) mkdir((P))
#endif

if (!direxists(plugindir))
  wxcmkdir(plugindir)
Logged
fireclown
Newbie
*
Posts: 12


Re: First impressions (and some bugs)
« Reply #17 on: December 08, 2008, 10:45:04 am »

By the way Troels, I haven't tested to see if you do this or not but please also note that there is also an equivalent to CopyFileEx for moving files as well, especially when the move needs to span across volumes (which is really then just a copy and delete). Appropriately enough the function is MoveFileEx(), although since you will want to show progress you will  likely want to use MoveFileWithProgress() instead. Just FYI.
Logged
troels
Administrator
Full Member
*****
Posts: 125


WWW
Re: First impressions (and some bugs)
« Reply #18 on: December 10, 2008, 11:19:18 pm »

I use MoveFileEx only when moving files between locations within the same volume and this happens in a snap.
Between volumes I [now] use CopyFileEx + subsequent delete.

Thanks
Troels
« Last Edit: December 11, 2008, 08:57:05 pm by troels » Logged

Pages: 1 [2] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP wxCommander Forum | Powered by SMF 1.0.8.
© 2001-2005, Lewis Media. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!