Fix folder import in queue.
This commit is contained in:
2 files changed
+7
-5
No files matched your search
@@ -58,7 +58,7 @@
|
|||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="pjh-GC-aOA">
|
||||||
<rect key="frame" x="29" y="1" width="322" height="15"/>
|
<rect key="frame" x="29" y="-1" width="322" height="17"/>
|
||||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
|
||||||
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="srx-EJ-mK6">
|
<textFieldCell key="cell" lineBreakMode="truncatingTail" sendsActionOnEndEditing="YES" title="Table View Cell" id="srx-EJ-mK6">
|
||||||
<font key="font" metaFont="cellTitle"/>
|
<font key="font" metaFont="cellTitle"/>
|
||||||
|
|||||||
@@ -306,6 +306,7 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
|||||||
/// Adds an array of SBQueueItem to the queue.
|
/// Adds an array of SBQueueItem to the queue.
|
||||||
/// Implements the undo manager.
|
/// Implements the undo manager.
|
||||||
func insert(items: [SBQueueItem], at indexes: IndexSet) {
|
func insert(items: [SBQueueItem], at indexes: IndexSet) {
|
||||||
|
if items.isEmpty { return }
|
||||||
guard let firstIndex = indexes.first else { fatalError() }
|
guard let firstIndex = indexes.first else { fatalError() }
|
||||||
|
|
||||||
table.beginUpdates()
|
table.beginUpdates()
|
||||||
@@ -591,10 +592,11 @@ class QueueController : NSWindowController, NSWindowDelegate, NSPopoverDelegate,
|
|||||||
|
|
||||||
for fileURL in directoryEnumerator {
|
for fileURL in directoryEnumerator {
|
||||||
|
|
||||||
if let value = try? url.resourceValues(forKeys: [URLResourceKey.isDirectoryKey]), let isDirectory = value.isDirectory, isDirectory == false, let fileURL = fileURL as? URL, supportedFileFormats.contains(fileURL.pathExtension.lowercased()) {
|
let fileValue = try? url.resourceValues(forKeys: [URLResourceKey.isDirectoryKey])
|
||||||
|
if fileValue?.isDirectory ?? false {
|
||||||
items.append(createItem(url: fileURL))
|
if let fileURL = fileURL as? URL, supportedFileFormats.contains(fileURL.pathExtension.lowercased()) {
|
||||||
|
items.append(createItem(url: fileURL))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if supportedFileFormats.contains(url.pathExtension.lowercased()) {
|
} else if supportedFileFormats.contains(url.pathExtension.lowercased()) {
|
||||||
|
|||||||
Reference in new issue
Block a user