gubment_cheez Posted July 26, 2007 Share Posted July 26, 2007 Paint.net isn't releasing folder handles to images that PDN opens when those images are closed (preventing modification/deletion of the folders themselves while pdn is still open). file handles themselves are released correctly, allowing the deletion of the files, but not the folder handle Quote You know the place. Link to comment Share on other sites More sharing options...
pyrochild Posted July 26, 2007 Share Posted July 26, 2007 Wow! You're right! I never even noticed that before... Rick, any plans on fixing this? Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 26, 2007 Share Posted July 26, 2007 I'm not sure I understand you. Can you provide me with some detail steps to reproduce the issue? Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
pyrochild Posted July 26, 2007 Share Posted July 26, 2007 @Rick: OK, open a file in Paint.NET, then try to rename it or delete it. You can't (duh) because Paint.NET has the file handle. Now try to rename or delete the folder it's in. Still can't, as expected. Now close the file (but leave Paint.NET open). You can now do whatever you want to the file, but still not the folder. For some reason, Paint.NET is not properly releasing the folder handle. Once Paint.NET is closed, you have control again. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
BoltBait Posted July 26, 2007 Share Posted July 26, 2007 pyrochild, if you open a new graphic in a new folder, is the old folder released? Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
pyrochild Posted July 26, 2007 Share Posted July 26, 2007 Nope. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 26, 2007 Share Posted July 26, 2007 This doesn't repro for me. Paint.NET does not keep the file, or the containing folder for that matter, open after it has loaded it. Maybe you have some plugin or shell extension that's doing something Wrong. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
pyrochild Posted July 26, 2007 Share Posted July 26, 2007 I removed all of my plugins just to be sure. Now it doesn't hold the file open, but under certain conditions the folder is still grabbed. Open Paint.NET, File > Open or Open Recent: Nothing held, normal behavior as you described. Find file in Explorer, RMB > Open With > Paint.NET Folder held open by Paint.NET, unmodifiable until Paint.NET is closed. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 26, 2007 Share Posted July 26, 2007 Nope, still no repro here ... Try using Process Explorer to find with process has the file handle open. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
pyrochild Posted July 26, 2007 Share Posted July 26, 2007 It'd definitely PaintDotNet.exe that has the file handle on the folder. Not only is it modifiable again the moment Paint.NET is closed, but Process Explorer confirms it. One strange thing I noticed in Proces Explorer though, was that if I started Paint.NET via its shortcuts, then did a File>Open, its working directory is its install dir. However, if I open via a file, procexp shows that Paint.NET believes its working directory to be the directory of the file used to open it. Oh, and in that situation, it doesn't even have a handle on its install directory, which it does when started w/o an image passed as a command line. Quote ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
gubment_cheez Posted July 26, 2007 Author Share Posted July 26, 2007 yes, Pyrochild has explained it completely. if I start PDN manually (by using the program icon), I can open a file (by either the file -> open dialog box, or from windows explorer), close it, and delete the file and it's folder. however, if I do not have PDN open, and I open a file from windows explorer, PDN opens with the file. after I close the file, I am unable to delete the folder that contained the file, as an example I'll be using C:/test/test.png. [Windows Explorer] open PDN, [PDN or W E] open test.png, [PDN] close test.png [W E] delete C:/test results in C:/test/test.png DELETED, C:/test DELETED *** [W E] open test.png [PDN] (opens with test.png) [PDN] close test.png [W E] delete C:/test results in C:/test/test.png DELETED, C:/test "cannot remove folder test: It is being used by another person or program." [PDN] exit program [W E] delete C:/test results in C:/test DELETED {edit: replaced backslashes with forward slashes, although it looks weird, but not as weird in the preview, now,,, and removed previous note} Quote You know the place. Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 27, 2007 Share Posted July 27, 2007 [note] Just use forward slashes. They work fine and get the point across. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 27, 2007 Share Posted July 27, 2007 Is this in XP or Vista, or either? On my system Process Explorer reports the "Current Directory" as either (1) the install dir (start -> paint.net), or (2) C:\Windows\System32 (file -> open with -> paint.net), or (3) the directory of the file (file -> edit). Anyway that makes sense that you can't delete the directory if it's the process' current directory. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 27, 2007 Share Posted July 27, 2007 In any event, I've fixed this for the next release. Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
gubment_cheez Posted July 27, 2007 Author Share Posted July 27, 2007 I'm running Windows XP Pro SP2. shouldn't PDN's home directory be %programfiles%/paintdotnet and not the image's home directory? or perhaps the user documents folder? Quote You know the place. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.