mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-08-17 08:00:34 +02:00
fix bug with nested folders not being adding when importing assets
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -775,8 +775,13 @@ func (im *Import) createAssetFromZipFile(
|
||||
return false, err
|
||||
}
|
||||
|
||||
// create root filesystem for the full context path (controlled paths only)
|
||||
// ensure shared directory exists
|
||||
fullContextPath := filepath.Join(im.Asset.RootFolder, contextFolder)
|
||||
if err := os.MkdirAll(fullContextPath, 0755); err != nil {
|
||||
return false, err
|
||||
}
|
||||
|
||||
// create root filesystem for the full context path (controlled paths only)
|
||||
contextRoot, err := os.OpenRoot(fullContextPath)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
||||
Reference in New Issue
Block a user