title: No Folder Creation despite mkdir being called
body: <p>As always, I apologize if this is simplistic, I am a novice with no formal education. I head to Uni in fall of 2018.</p>
  
  <p>I have a password manager which creates a backup of its settings to a file, so the user can restore it at a later time. While I was testing this feature (and the corresponding "Restore" feature) I had it simply put the backup file in the user's download directory. There were no issues with this, and I must say <strong><em>there are no issues with permissions</em></strong>. Runtime and manifest permissions are both present and functional.</p>
  
  <p>The issue arose when I sought to have the backup file put in a directory of my own making. I wanted it to be put in a folder called "PSync" in the user's Documents directory. The code to check if it exists and if not then to create it runs correctly, and no errors are called. It simply does nothing. Attached is the relevant code, and a picture demonstrating the path it uses. It should be noted that the statements inside the <code>} else {</code> run but the file is not created.</p>
  
  <pre><code> String dirPath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS).getPath().toString();
                      dirPath = dirPath + "/PSync";
                      Toast.makeText(Main.this, "Path: " + dirPath, Toast.LENGTH_SHORT).show();
                      File directory = new File(dirPath);
  
                      if (directory.isDirectory()) {
                      } else {
                          directory.mkdir();
                          Toast.makeText(Main.this, "Directory created.", Toast.LENGTH_SHORT).show();
                      }
  </code></pre>
  
  <p>Pic with demonstrated file path:</p>
  
  <p><a href="https://i.stack.imgur.com/YbQKh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/YbQKh.png" alt="enter image description here"></a></p>