[GH-ISSUE #876] Setup fails because the file is locked #2611

Closed
opened 2026-03-01 19:00:08 +03:00 by kerem · 0 comments
Owner

Originally created by @KirillOsenkov on GitHub (May 3, 2021).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/876

Originally assigned to: @NickeManarin on GitHub.

I keep my ScreenToGif.exe in my Dropbox folder, and when I updated today the setup failed with this message in the log:

▬ Message - 
	The process cannot access the file 'C:\Dropbox\Tools\ProgramFilesFolder\ScreenToGif' because it is being used by another process.
♦ Date/Hour - 
	5/2/2021 8:14:35 PM
▲ Source - 
	mscorlib
▼ TargetSite - 
	Void WinIOError(Int32, System.String)
♠ StackTrace - 
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data)
   at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
   at ScreenToGif_Installer.UserControls.Progress.CopyPortableFiles()

I'm guessing Dropbox takes some kind of a lock on files intermittently so perhaps consider adding a retry a few times?

To help with diagnosing locked files, consider using https://github.com/cklutz/LockCheck (here's a sample of how it's used in MSBuild: https://source.dot.net/#Microsoft.Build.Tasks.Core/LockCheck.cs,726a666e72008c9b)

Thanks again for the fantastic tool!

Originally created by @KirillOsenkov on GitHub (May 3, 2021). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/876 Originally assigned to: @NickeManarin on GitHub. I keep my ScreenToGif.exe in my Dropbox folder, and when I updated today the setup failed with this message in the log: ``` ▬ Message - The process cannot access the file 'C:\Dropbox\Tools\ProgramFilesFolder\ScreenToGif' because it is being used by another process. ♦ Date/Hour - 5/2/2021 8:14:35 PM ▲ Source - mscorlib ▼ TargetSite - Void WinIOError(Int32, System.String) ♠ StackTrace - at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound, WIN32_FIND_DATA& data) at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost) at ScreenToGif_Installer.UserControls.Progress.CopyPortableFiles() ``` I'm guessing Dropbox takes some kind of a lock on files intermittently so perhaps consider adding a retry a few times? To help with diagnosing locked files, consider using https://github.com/cklutz/LockCheck (here's a sample of how it's used in MSBuild: https://source.dot.net/#Microsoft.Build.Tasks.Core/LockCheck.cs,726a666e72008c9b) Thanks again for the fantastic tool!
kerem 2026-03-01 19:00:08 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#2611
No description provided.