Answers.Body: <p>My guess would be your Asset Indexes are out of sync.</p>
  
  <p>If you go to Settings->Utilities in the Control Panel, there is one that says "Update Asset Indexes".  Click it, let it run and you might be prompted to resolve some out-of-sync indexes.  Once you do that, it should work normally.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-30T09:21:12.753Z
Answers.Text: I did this a number of times but the folders keep coming back. Any advice?
Answers.UserDisplayName: aaandre
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-11-13T01:04:15.613Z
Answers.LastActivityDate: 2018-11-13T01:04:15.613Z
Answers.UserDisplayName: Brad Bell
Body: <p>I use Google storage for photos. The Google storage volume is mapped to a bucket's subfolder.</p>
  
  <p><a href="https://i.sstatic.net/c5A3Q.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/c5A3Q.png" alt="google storage bucket subfolder as a volume"></a></p>
  
  <p>Unfortunately these appear as subfolders in assets, along with a set of repeated folder structure. I did not create these. </p>
  
  <p><a href="https://i.sstatic.net/VLw43.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/VLw43.png" alt="undesirable folders auto-created by craft"></a></p>
  
  <p>Any way to prevent CraftCMS from creating them? What is the cause they get created?</p>
  
  <p>P.S. Is it possible that they are the remainder of subfolders which I created on the filesystem before setting up the assets to use google storage? I did delete the local storage assets volume between creating the google storage one. But, the local storage did have the ahtletes/photos in the local assets folder. </p>
  
  <p>At this time, the local assets folder does not have the athletes/photos subfolder.</p>
  
  <p>I am trying to understand what action or process creates these folders?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-12T22:37:23.957Z
Comments.Text: Several questions... you only have one Google storage volume setup?  What happens if you update your Asset indexes in the Craft Control Panel.  If you connect to Google storage outside of Craft, do you see the same structure? Why is @webroot showing up as a root level folder in the volume?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-12T23:40:25.180Z
Comments.Text: 1. I have three volumes based on the same bucket, with different root folders. Only one of them creates the additional subfolders. 2. I just updated asset indexes -- I saw a list of folders which could not be found and approved their deletion. 3. I do see the folder structure exactly as entered in the "Subfolder" field -- in the google storage bucket. 4. No idea but it may be a reminder of an old volume. I think updating the indexes may have resolved the issue.
Comments.UserDisplayName: aaandre
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-12T23:57:40.113Z
Comments.Text: Awesome... if that solved it for you, be sure and add it as an official answer. Might end up helping someone in the future. :)
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-13T00:16:37.347Z
Comments.Text: Could you please create an answer based on your comment so I can accept it?
Comments.UserDisplayName: aaandre
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-11-13T01:04:27.793Z
Comments.Text: No problem... done!
Comments.UserDisplayName: Brad Bell
Tags: <craft3><assets>
Title: Craft 3 auto-creates sub-folders in assets. How can I prevent this?
ThreadText: # Craft 3 auto-creates sub-folders in assets. How can I prevent this?
  
  (Asked by: username_0 on 2018-11-12)
  
  I use Google storage for photos. The Google storage volume is mapped to a bucket's subfolder.
  
  [![google storage bucket subfolder as a volume](https://i.sstatic.net/c5A3Q.png)](https://i.sstatic.net/c5A3Q.png)
  
  Unfortunately these appear as subfolders in assets, along with a set of repeated folder structure. I did not create these.
  
  [![undesirable folders auto-created by craft](https://i.sstatic.net/VLw43.png)](https://i.sstatic.net/VLw43.png)
  
  Any way to prevent CraftCMS from creating them? What is the cause they get created?
  
  P.S. Is it possible that they are the remainder of subfolders which I created on the filesystem before setting up the assets to use google storage? I did delete the local storage assets volume between creating the google storage one. But, the local storage did have the ahtletes/photos in the local assets folder.
  
  At this time, the local assets folder does not have the athletes/photos subfolder.
  
  I am trying to understand what action or process creates these folders?
  
  **Tags:** craft3, assets
  
  > **Comments:**
  > **username_1**: Several questions... you only have one Google storage volume setup?  What happens if you update your Asset indexes in the Craft Control Panel.  If you connect to Google storage outside of Craft, do you see the same structure? Why is @webroot showing up as a root level folder in the volume?  
  > **username_0**: 1. I have three volumes based on the same bucket, with different root folders. Only one of them creates the additional subfolders. 2. I just updated asset indexes -- I saw a list of folders which could not be found and approved their deletion. 3. I do see the folder structure exactly as entered in the "Subfolder" field -- in the google storage bucket. 4. No idea but it may be a reminder of an old volume. I think updating the indexes may have resolved the issue.  
  > **username_1**: Awesome... if that solved it for you, be sure and add it as an official answer. Might end up helping someone in the future. :)  
  > **username_0**: Could you please create an answer based on your comment so I can accept it?  
  > **username_1**: No problem... done!  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-11-13. Score: 1 | Accepted answer
  
  My guess would be your Asset Indexes are out of sync.
  
  If you go to Settings->Utilities in the Control Panel, there is one that says "Update Asset Indexes". Click it, let it run and you might be prompted to resolve some out-of-sync indexes. Once you do that, it should work normally.
  
  > **Comments:**
  > **username_0**: I did this a number of times but the folders keep coming back. Any advice?  
  
  ---
  
  