Page 1 of 1

1.8.7b, cannot rename folder due to file lock

Posted: Mon Feb 17, 2025 11:32 pm
by golemus
I am not sure if this is a bug or a feature as many other programs have the same issue. Anyway too often there comes a situation that you are unable to rename a folder because a file inside of it is open in xnview.

Way to reproduce (win11)

- double click a file in DRIVELETTER:\...\FOLDERA\FOLDERB to open it in XNView Viewer mode
- move one level up in File Explorer to FOLDERA
- press F2 and try to rename FOLDERB to FOLDERC



Expected behaviour:
- folder is renamed. XNView either keeps the pic open and in memory but will give error if you press arrow button or do any operations.

Observer behaviour:
- folder in use dialogue: the action can't be completed because the folder or a file in it is open in another program





FYI sometimes the rename succeeds but most of the time it does not. The folder I tried in is inside Onedrive pretty recent version.

Re: 1.8.7b, cannot rename folder due to file lock

Posted: Wed Feb 19, 2025 9:16 am
by xnview
golemus wrote: Mon Feb 17, 2025 11:32 pm - double click a file in DRIVELETTER:\...\FOLDERA\FOLDERB to open it in XNView Viewer mode
- move one level up in File Explorer to FOLDERA
- press F2 and try to rename FOLDERB to FOLDERC
yes because XnView watch the folder of opened file

Re: 1.8.7b, cannot rename folder due to file lock

Posted: Wed Feb 19, 2025 10:10 am
by golemus
xnview wrote: Wed Feb 19, 2025 9:16 am
golemus wrote: Mon Feb 17, 2025 11:32 pm - double click a file in DRIVELETTER:\...\FOLDERA\FOLDERB to open it in XNView Viewer mode
- move one level up in File Explorer to FOLDERA
- press F2 and try to rename FOLDERB to FOLDERC
yes because XnView watch the folder of opened file
ok.

It is making organization of pics much more time consuming as I am doing this all the time, first going in the folder to check what is inside, then going out and giving it descriptive name. MS Photos and Faststone Image Viewer don't have this issue. Would it be hard to fix it?

Re: 1.8.7b, cannot rename folder due to file lock

Posted: Wed Feb 19, 2025 2:51 pm
by xnview
it's not a bug, but i can add a an option to not watch current folder

Re: 1.8.7b, cannot rename folder due to file lock

Posted: Wed Feb 19, 2025 2:54 pm
by golemus
xnview wrote: Wed Feb 19, 2025 2:51 pm it's not a bug, but i can add a an option to not watch current folder
ok, that would be cool.

From the way you speak it sounds that there is some feature which needs the folder to be watched. I am curious what is it?

Re: 1.8.7b, cannot rename folder due to file lock

Posted: Thu Feb 20, 2025 10:12 am
by xnview
golemus wrote: Wed Feb 19, 2025 2:54 pm From the way you speak it sounds that there is some feature which needs the folder to be watched. I am curious what is it?
if files are added or removed in the folder, file list is updated