We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 69f4d41 commit 4b22fb4Copy full SHA for 4b22fb4
app/server/sonicpi/lib/sonicpi/gitsave.rb
@@ -20,9 +20,15 @@ def initialize(path)
20
path = path.encode('utf-8')
21
@path = path
22
begin
23
- @repo = Rugged::Repository.new(path + '/.git')
+ @repo = Rugged::Repository.new(path + '.git')
24
rescue
25
- @repo = Rugged::Repository.init_at path, false
+ begin
26
+ @repo = Rugged::Repository.init_at path, false
27
+ rescue
28
+ # Repo is malformed - nuke it for now!
29
+ FileUtils.rm_rf path + '.git'
30
31
+ end
32
end
33
34
0 commit comments