Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 07, 2016, 11:58:47 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: BUG: Save location remains in use  (Read 1739 times)

dbareis

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
BUG: Save location remains in use
« on: August 21, 2011, 05:42:22 PM »
Hi,

If I capture an image as use File->Save copy of image as" then later try to move or delete the directory this will fail, for some strange reason the program either changes its current directory to the destination (in which case it should restore it) or keeps the directory open.  Need to restart the program to be able to continue.

This has happened in older versions as well but currently I'm using v2.93.01

>:(

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: BUG: Save location remains in use
« Reply #1 on: August 21, 2011, 05:47:11 PM »
strange.  ill try to fix.

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: BUG: Save location remains in use
« Reply #2 on: August 21, 2011, 05:53:12 PM »
This is pretty normal behavior - when you use the Get{Open,Save}FileName functions, Windows changes the process' (yes, it's per-process and not per-thread!) current working directory, and you have to actively save/restore the CWD if you don't want that behavior.

Keep in mind that OFN_NOCHANGEDIR "is ineffective for GetOpenFileName", so you might want to do manual CWD save/restore even though that flag exists. I seem to recall OFN_NOCHANGEDIR not working on some (ancient by now :)) Windows versions, but might just have confused that with not having effect for GOFN.
- carpe noctem

dbareis

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 6
    • View Profile
    • Donate to Member
Re: BUG: Save location remains in use
« Reply #3 on: August 21, 2011, 06:45:00 PM »
Windows is just one big bag of bugs, the issue that prompted my post was on WINXP SP3 but pretty sure it also occurs at home on WIN7 64 bit.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: BUG: Save location remains in use
« Reply #4 on: August 21, 2011, 06:47:13 PM »
thanks for that info f0dder, that helps.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 36,412
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: BUG: Save location remains in use
« Reply #5 on: September 05, 2011, 01:34:34 PM »
fixed in beta version, will be in next release.