| |
@@ -31,6 +31,13 @@
|
| |
self.entry_type = {'old': SourceFileEntry,
|
| |
'bsd': BSDSourceFileEntry}[entry_type]
|
| |
self.entries = []
|
| |
+ # if there is a directory with the same name, it causes a collision
|
| |
+ # during reading the file and during its replacing as well
|
| |
+ if os.path.exists(sourcesfile) and os.path.isdir(sourcesfile):
|
| |
+ raise ValueError(
|
| |
+ "'{0}' has to be a regular file, not a directory. The '{0}' "
|
| |
+ "filename is a rpkg library default name or a specific layout "
|
| |
+ " setting)".format(sourcesfile))
|
| |
|
| |
if not replace:
|
| |
if not os.path.exists(sourcesfile):
|
| |
Resolves: #541
JIRA: RHELCMP-4166
Signed-off-by: Ondrej Nosek onosek@redhat.com