Fixed getSuggestedFilename to base the length of the suggested
filename from the original filename.
This commit is contained in:
parent
2e7e67eb54
commit
eeb43618a6
|
@ -634,6 +634,7 @@ public class DosFormatDisk extends FormattedDisk {
|
|||
* and trimmed (trailing whitespace may cause confusion).
|
||||
*/
|
||||
public String getSuggestedFilename(String filename) {
|
||||
return filename.toUpperCase().substring(0, 30).trim();
|
||||
int len = Math.min(filename.length(), 30);
|
||||
return filename.toUpperCase().substring(0, len).trim();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -413,6 +413,7 @@ public class RdosFormatDisk extends FormattedDisk {
|
|||
* and trimmed (trailing whitespace may cause confusion).
|
||||
*/
|
||||
public String getSuggestedFilename(String filename) {
|
||||
return filename.toUpperCase().substring(0, 24).trim();
|
||||
int len = Math.min(filename.length(), 24);
|
||||
return filename.toUpperCase().substring(0, len).trim();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue