Run the check for disk space only if saving to a new file.
This commit is contained in:
1 parent
185325d68b
commit
9bf5d04050
1 file changed
+3
-1
@@ -264,7 +264,8 @@
|
|||||||
|
|
||||||
self.mp4File.delegate = self;
|
self.mp4File.delegate = self;
|
||||||
|
|
||||||
// Check if there is enough space on the dest disk
|
// Check if there is enough space on the destination disk
|
||||||
|
if (![self.URL isEqualTo:self.destURL]) {
|
||||||
NSDictionary *dict = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[[self.destURL URLByDeletingLastPathComponent] path] error:NULL];
|
NSDictionary *dict = [[NSFileManager defaultManager] attributesOfFileSystemForPath:[[self.destURL URLByDeletingLastPathComponent] path] error:NULL];
|
||||||
NSNumber *freeSpace = [dict objectForKey:NSFileSystemFreeSize];
|
NSNumber *freeSpace = [dict objectForKey:NSFileSystemFreeSize];
|
||||||
if (freeSpace && [self.mp4File dataSize] > [freeSpace longLongValue]) {
|
if (freeSpace && [self.mp4File dataSize] > [freeSpace longLongValue]) {
|
||||||
@@ -276,6 +277,7 @@
|
|||||||
}
|
}
|
||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Convert from a file reference url to a normal url
|
// Convert from a file reference url to a normal url
|
||||||
// the file will be replaced if optimized, and the reference url
|
// the file will be replaced if optimized, and the reference url
|
||||||
|
|||||||
Reference in new issue
Block a user