title: Java filedialog always prepends /Users/<user>/Desktop in Mac
body: <p>I'm using <code>System.setProperty("apple.awt.fileDialogForDirectories", "true");</code> to only select folders. When I execute <code>new java.io.File(fd.getFile()).getAbsolutePath();</code>, it always returns <code>/Users/&lt;user&gt;/Desktop/&lt;folder&gt;</code>. Say I select /Users, it will return <code>/Users/&lt;user&gt;/Desktop/Users</code>. How can I fix it?</p>
  
  <p>Code:</p>
  
  <pre><code>if (System.getProperty("os.name").toLowerCase().contains("mac")) {
          System.setProperty("apple.awt.fileDialogForDirectories", "true");
  
          FileDialog fd = new FileDialog(this, "Choose a folder to save streams", FileDialog.LOAD);
          fd.setDirectory(saveStreamLocTB.getText());
  
          fd.setVisible(true);
  
          String loc = new java.io.File(fd.getFile()).getAbsolutePath();
          if (loc != null) {
              p.setSaveStreamLoc(loc);
              saveStreamLocTB.setText(loc);
          }
  
          System.setProperty("apple.awt.fileDialogForDirectories", "false");
      }
  </code></pre>
  
  <p><strong>edit</strong> I need the full path </p>