diff --git a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java index 7a091c0..873e7b2 100644 --- a/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java +++ b/lib/ac-api/src/main/java/com/webcodepro/applecommander/storage/os/prodos/ProdosFormatDisk.java @@ -253,7 +253,11 @@ public class ProdosFormatDisk extends FormattedDisk { } blockNumber = nextBlockNumber; } - throw new DiskFullException(textBundle.get("ProdosFormatDisk.UnableToAllocateSpaceError"), this.getFilename()); //$NON-NLS-1$ + if (directory instanceof ProdosSubdirectoryHeader) { + throw new DiskFullException(textBundle.get("ProdosFormatDisk.UnableToAllocateSpaceError"), this.getFilename()); //$NON-NLS-1$ + } else { + throw new DiskFullException(textBundle.get("ProdosFormatDisk.UnableToAllocateFileEntry"), this.getFilename()); + } } /** @@ -1438,8 +1442,12 @@ public class ProdosFormatDisk extends FormattedDisk { } blockNumber = nextBlockNumber; } - throw new DiskFullException( - textBundle.get("ProdosFormatDisk.UnableToAllocateSpaceError") //$NON-NLS-1$ - , this.getFilename()); + if (directory instanceof ProdosSubdirectoryHeader) { + throw new DiskFullException( + textBundle.get("ProdosFormatDisk.UnableToAllocateSpaceError") //$NON-NLS-1$ + , this.getFilename()); + } else { + throw new DiskFullException(textBundle.get("ProdosFormatDisk.UnableToAllocateFileEntry"), this.getFilename()); + } } } diff --git a/lib/ac-api/src/main/resources/com/webcodepro/applecommander/storage/StorageBundle.properties b/lib/ac-api/src/main/resources/com/webcodepro/applecommander/storage/StorageBundle.properties index c6e2605..04b730b 100644 --- a/lib/ac-api/src/main/resources/com/webcodepro/applecommander/storage/StorageBundle.properties +++ b/lib/ac-api/src/main/resources/com/webcodepro/applecommander/storage/StorageBundle.properties @@ -85,6 +85,7 @@ RdosFileEntry.NotInUse= ProdosFormatDisk.InvalidDimensionError=Invalid dimension for isFree\! Did you call next first? ProdosFormatDisk.Blank=BLANK ProdosFormatDisk.UnableToAllocateSpaceError=Unable to allocate more space for another file\! +ProdosFormatDisk.UnableToAllocateFileEntry=Unable to allocate another file entry in root directory\! ProdosFormatDisk.VolumeAccess=Volume Access ProdosFormatDisk.BitmapBlockNumber=Block Number of Bitmap ProdosFormatDisk.CreationDate=Creation Date