Forum Discussion

pdupont's avatar
pdupont
Copper Contributor
May 03, 2024

Cloud Files API - OneDrive - explorer.exe locking folders and prevents rename of directory

We are implementing a cloud sync engine using the cloud files API.
Everything is working more or less as expected.

However if I create a folder hierarchy of 2 or more folders, say folder A has a child folder B which has another child folder C.
Whenever I open folder C in the file explorer I am no longer able to rename, delete or move folder A.
It states:

`The action can't be completed because the folder or a file in it is open in another program`.

 

 

It does not happen when opening folder A but only when navigating into folder C.

No files are present in the folders, only the folder hierarchy and it happens every time and can be reproduced 100% on my end.
This also happens on our customers system as well as our QA systems.

 

I checked the open handles using Powertoys File Locksmith and the Resource Monitor and only explorer.exe has open handles on the folder and subfolders.

 

 

If I restart explorer.exe the folder can be changed again.
This is also an issue with OneDrive, so I can assume it has nothing to do with our own implementation of the cloud files API.
Also needless to say, this only happens when interacting with folders below a sync root and not on the "regular" file system.

 

The issue can be reproduced on Windows 10 (10.0.19045). The issue also seems to happen on Windows 11 on customers PCs but that is unconfirmed because I am not able to reproduce the issue on Windows 11 (10.0.22621). Edit: This issue can not be reproduced on Windows 11. The aforementioned issue with our customer was unrelated to this.

No RepliesBe the first to reply

Resources