try {
// Recreate the FileURL using the file's canonical path
FileURL newURL = FileURL.getFileURL(folder.getCanonicalPath());
// Keep the credentials and properties (if any)
newURL.setCredentials(folderURL.getCredentials());
newURL.importProperties(folderURL);
this.folderURL = newURL;
// Invalidate the AbstractFile instance
this.folder = null;
// There won't be any further attempts after this one
canonicalPathFollowed = true;