This name can not modify the name of the parent folder where

Just starting out? Need help? Post your questions and find answers here.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

This name can not modify the name of the parent folder where

Post by gurj »

bug
Use the IDE to open a code file and then close this code file.
Then, This name can not modify the name of the parent folder where the code file is.
[pb5.72 x86 winxp]
my pb for chinese:
http://ataorj.ys168.com
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: This name can not modify the name of the parent folder w

Post by kenmo »

I agree, it seems like a bug.

The IDE must keep some filesystem handle open, preventing renaming even after you've closed all files.

If I had more time I would investigate myself :(


Furthermore... should it even lock the directory WHILE the file is open? I just tested, and Notepad++ lets me rename the parent directory while a text file is open. (Of course, when you re-focus NP++ it warns you the file on disk no longer exists.)
Marc56us
Addict
Addict
Posts: 1479
Joined: Sat Feb 08, 2014 3:26 pm

Re: This name can not modify the name of the parent folder w

Post by Marc56us »

Yes, it depends on the programs. Some make an implicit change of directory on opening and nothing on closing so the system can no longer rename the directory because it has become the current directory.
Notepad++ does not do it and therefore allows renaming but others block (Metapad, Word, Excel etc).
Under Windows, the directory selected in the file explorer does not become the current directory.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: This name can not modify the name of the parent folder w

Post by gurj »

Last night I closed the system, just now open it and IDE, and again try again this BUG. But it is very strange, Can't reproduce.
my pb for chinese:
http://ataorj.ys168.com
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: This name can not modify the name of the parent folder w

Post by gurj »

I often use PB, often encounter files or folders can not rename, so check the problem, closed IDE is normal. Now it seems that it is a bug, but unstable, or I did not find the root.
my pb for chinese:
http://ataorj.ys168.com
BarryG
Addict
Addict
Posts: 3322
Joined: Thu Apr 18, 2019 8:17 am

Re: This name can not modify the name of the parent folder w

Post by BarryG »

gurj wrote:Use the IDE to open a code file and then close this code file.
Then, This name can not modify the name of the parent folder where the code file is.
Cannot confirm. I can rename the parent folder of the code file after quitting the IDE.
gurj wrote:[pb5.72 x86 winxp]
XP? That's probably your problem. Why use such an old, unsupported operating system?

If this is a real bug, you should be able to provide us with a source code file that you're testing with, along with exact step-by-step instructions on how to reproduce it.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: This name can not modify the name of the parent folder w

Post by gurj »

Sorry, I did not take into account whether it was related to the specific code. I often open or create a number of temporary code, and now do not know which code file caused.
As for why WinXP is used, because it is more concise, I do not like the more cumulative system.
my pb for chinese:
http://ataorj.ys168.com
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: This name can not modify the name of the parent folder w

Post by NicTheQuick »

gurj wrote:As for why WinXP is used, because it is more concise, I do not like the more cumulative system.
That's the dumbest argument I have ever heard.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: This name can not modify the name of the parent folder w

Post by gurj »

I can not understand, why the operating system is more complex, so that hardware is running or software itself slowly.
my pb for chinese:
http://ataorj.ys168.com
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: This name can not modify the name of the parent folder w

Post by kenmo »

Cannot confirm. I can rename the parent folder of the code file after quitting the IDE.
He meant: cannot rename parent folder after closing the file in the IDE. Not closing the entire IDE program.

I can recreate the issue on Windows 10. It has nothing to do with XP specifically.

Marc56us pointed me on the right track. It matters how you launch the IDE.

If you launch the IDE by launching a PB file, the IDE uses that as the CurrentDirectory, which prevents you from renaming.

I think it's the IDE code which does that, not Windows. But I'm not sure without more testing. If so, it could be considered an IDE issue.

Exact steps:
1. Create a folder, such as Desktop/Test
2. Open the IDE
3. Save a new file, such as Desktop/Test/file.pb
4. Keep it open...
5. Notice, in Explorer, you can rename both the file and the folder
6. Close IDE

1. Create a folder, such as Desktop/Test2
2. Create a blank PB or copy one in from elsewhere
3. Launch the PB file to open the IDE
4. Keep it open...
5. Notice you CANNOT rename the folder (something's locked)
6. Close the tab in the IDE
7. Still cannot rename folder
8. Close IDE
9. Now, can rename folder
User avatar
NicTheQuick
Addict
Addict
Posts: 1226
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: This name can not modify the name of the parent folder w

Post by NicTheQuick »

gurj wrote:I can not understand, why the operating system is more complex, so that hardware is running or software itself slowly.
WinXP is much less efficient than Windows 10. Also it's insecure because it does not contain all the security standards which are common now. If you do not want to use Windows then at least use Linux.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: This name can not modify the name of the parent folder w

Post by kenmo »

I just tested with different programs.

Launching a program - by launching a file in Windows Explorer - does seem to set its current working directory (CWD) to that folder. Meaning the folder can't be renamed until the program quits.

Seems to be Windows standard behavior. I don't think the IDE needs to be changed.
User avatar
gurj
Enthusiast
Enthusiast
Posts: 664
Joined: Thu Jan 22, 2009 3:48 am
Location: china
Contact:

Re: This name can not modify the name of the parent folder w

Post by gurj »

@kenmo:
thanks! yes.
I just just experiencing the IDE and other, it is that you say. The problem reproduces.
The problem is independent of PB.
my pb for chinese:
http://ataorj.ys168.com
BarryG
Addict
Addict
Posts: 3322
Joined: Thu Apr 18, 2019 8:17 am

Re: This name can not modify the name of the parent folder w

Post by BarryG »

kenmo wrote:1. Create a folder, such as Desktop/Test2
2. Create a blank PB or copy one in from elsewhere
3. Launch the PB file to open the IDE
4. Keep it open...
5. Notice you CANNOT rename the folder (something's locked)
6. Close the tab in the IDE
7. Still cannot rename folder
8. Close IDE
9. Now, can rename folder
Confirmed with these steps on Win 10.

However, as kenmo said, this is NOT a PureBasic problem because it also happens with Notepad:

1. Create a new folder on your desktop.
2. Drag a text file into it.
3. Double-click the file to open it in Notepad.
4. While open, try to rename that new folder.
5. Windows (the OS) doesn't allow it.
6. Close Notepad.
7. Windows now lets you rename it.

Therefore, not a PureBasic bug.
Post Reply