Comments (2)
Odd! Can reproduce.
from winfile.
I think this is due to current directory handling:
00 00000089`2a442af0 00007ffa`7b73c5c4 ntdll!NtOpenFile
01 00000089`2a442af0 00007ffa`7b73c1c4 ntdll!RtlpCreateNewDirectoryReference+0x8c
02 00000089`2a442b90 00007ffa`773a8be8 ntdll!RtlSetCurrentDirectory_U+0xf4
03 00000089`2a442bf0 00007ff6`2fdece54 KERNELBASE!SetCurrentDirectoryW+0x28
04 00000089`2a442c10 00007ff6`2fd82ab4 Winfile!SetWindowDirectory+0x64 [c:\src\github\microsoft\winfile\src\wfutil.c @ 1082]
05 00000089`2a443c60 00007ff6`2fd7f280 Winfile!OpenOrEditSelection+0xc4 [c:\src\github\microsoft\winfile\src\wfcomman.c @ 630]
06 00000089`2a445540 00007ff6`2fdf2d44 Winfile!AppCommandProc+0x7d0 [c:\src\github\microsoft\winfile\src\wfcomman.c @ 964]
07 00000089`2a44b630 00007ffa`78271504 Winfile!FrameWndProc+0x11f4 [c:\src\github\microsoft\winfile\src\winfile.c @ 1031]
I see the same behavior on WinFile on NT 3.1.
Current directories in Windows are a bit of a frustrating mess. The system allows a file open relative to an existing file handle when opening down the tree, but opening up the tree requires parsing strings. That means each process current directory consists of a handle (used to open foo
) and a path (used to open ..\foo
.) That in turn means that if a process has a current directory, it is not tolerant to that directory being renamed, or its path will become stale. So, current directory handles are opened without FILE_SHARE_DELETE
, ensuring that the string path is in sync with the handle, which creates the behavior here.
I haven't looked into what it would take to avoid changing current directories. It is possible to construct fully qualified paths and always operate on them, avoiding the need to tell Win32 about any current directory. Doing that implies firstly finding all of the code paths that aren't using fully qualified paths, then updating them to be fully qualified.
from winfile.
Related Issues (20)
- WinFile Portable released by PortableApps.com HOT 1
- Open Explorer.exe in selected directory HOT 5
- oomkilled HOT 1
- Question: How does non-OLE Drag and Drop work? HOT 2
- software and add-ons to edit and compile File Manager HOT 2
- Enhancement Request - Increase / Decrease Font using Ctrl + Mouse Wheel and / or new Toolbar Buttons HOT 6
- winfile do not work on windows pe 10 HOT 5
- Bug - Menu >> File >> Run for long command line gets truncated HOT 6
- Add create file option in context menu and toolbar HOT 3
- ζΊδΈιη HOT 2
- Read-only attribute on files copied from CD-ROM HOT 4
- Support sparse files? HOT 2
- How to specify the destination HOT 1
- I am off HOT 1
- Open File Manager starting in current folder, or folder specified on command line HOT 1
- Update Winfile on Chocolatey HOT 2
- UNC support
- Wanted: Undelete DLL
- Some saved settings are not respected when an initial directory is specified in the command line
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from winfile.