Skip to content
This repository has been archived by the owner on Oct 1, 2024. It is now read-only.

Commit

Permalink
Revert "#118"
Browse files Browse the repository at this point in the history
This reverts commit d2ced9c.
  • Loading branch information
BO8979 authored and BO8979 committed Dec 6, 2019
1 parent d2ced9c commit e353276
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/org/codehaus/mojo/rpm/SpecWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@
* specific language governing permissions and limitations
* under the License.
*/
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;

import java.io.*;
import java.util.Collection;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -239,8 +238,8 @@ private void writeFiles()
scanner.setExcludes( null );
scanner.scan();

final boolean noFiles = map.getSources().isEmpty() || (scanner.isEverythingIncluded() && links.isEmpty());
if ( noFiles && map.isDirectoryIncluded() && !map.isRecurseDirectories() )
if ( scanner.isEverythingIncluded() && links.isEmpty() && map.isDirectoryIncluded()
&& !map.isRecurseDirectories() )
{
log.debug( "writing attribute string for directory: " + destination );
spec.println( attrString + " \"" + destination + "\"" );
Expand Down Expand Up @@ -273,7 +272,7 @@ private void writeFiles()
}

// only list files if requested (directoryIncluded == false) or we have to
if ( !map.isDirectoryIncluded() || !noFiles )
if ( !( map.isDirectoryIncluded() && scanner.isEverythingIncluded() && links.isEmpty() && !map.isRecurseDirectories()) )
{
final String[] files = scanner.getIncludedFiles();

Expand Down

0 comments on commit e353276

Please sign in to comment.