mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-09-19 18:16:25 +00:00
Fix root_id is empty in commit (#586)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
@@ -1928,6 +1928,10 @@ func postMultiFilesRecursive(repo *repomgr.Repo, dirID, toPath, user string, den
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
ret = newdir.DirID
|
ret = newdir.DirID
|
||||||
|
} else {
|
||||||
|
// The ret will be an empty string when failed to find parent dir, an error should be returned in such case.
|
||||||
|
err := fmt.Errorf("failed to find parent dir for %s", toPath)
|
||||||
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret, nil
|
return ret, nil
|
||||||
@@ -2576,6 +2580,9 @@ func putFileRecursive(repo *repomgr.Repo, dirID, toPath string, newDent *fsmgr.S
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
ret = newdir.DirID
|
ret = newdir.DirID
|
||||||
|
} else {
|
||||||
|
err := fmt.Errorf("failed to find parent dir for %s", toPath)
|
||||||
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret, nil
|
return ret, nil
|
||||||
|
Reference in New Issue
Block a user