Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fae07e4

Browse files
Copy package to destination if move failed (should fix sporadic Access is denied errors on Windows) (#1938)
1 parent c9663a3 commit fae07e4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎arduino/resources/install.go‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ func (release *DownloadResource) Install(downloadDir, tempPath, destDir *paths.P
9191

9292
// Move/rename the extracted root directory in the destination directory
9393
if err := root.Rename(destDir); err != nil {
94-
return fmt.Errorf(tr("moving extracted archive to destination dir: %s", err))
94+
// Copy the extracted root directory to the destination directory, if move failed
95+
if err := root.CopyDirTo(destDir); err != nil {
96+
return fmt.Errorf(tr("moving extracted archive to destination dir: %s", err))
97+
}
9598
}
9699

97100
// TODO

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /