Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

Improve git code cloning #20

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kipero
Copy link
Contributor

@Kipero Kipero commented Jun 14, 2021

Remove directory while trying to clone code

  • Before removing we need to set files attributes to normal as git files refuse to be deleted

It allows to always run latest code from repos without issues.

Remove directory while trying to clone code

* Before removing we need to set files attributes to normal as git files refuse to be deleted
Copy link
Contributor

@danil179 danil179 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment about deleting files. Notify the user first.

System.IO.DirectoryInfo cloningDir = new System.IO.DirectoryInfo(cloningPath);
// Set attributes in cloningDir to normal, as git files refuse to be deleted
setAttributesNormal(cloningDir);
cloningDir.Delete(true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to ask the user with a warning message box, something like The folder {folderName} is already in use, are you sure you want to delete existing files?.

Another possibility is just to create a new folder GameServer2 and advance the number if the folder is in use.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants