mirror of
https://github.com/wassname/sloth.git
synced 2026-07-16 11:21:45 +08:00
appendfiles: don't make an absolute path relative
This commit is contained in:
@@ -101,7 +101,8 @@ class AppendFilesCommand(BaseCommand):
|
||||
for filename in args[1:]:
|
||||
rel_filename = filename
|
||||
try:
|
||||
rel_filename = os.path.relpath(filename, os.path.dirname(args[0]))
|
||||
if not os.path.isabs(filename):
|
||||
rel_filename = os.path.relpath(filename, os.path.dirname(args[0]))
|
||||
except:
|
||||
pass
|
||||
|
||||
@@ -117,6 +118,7 @@ class AppendFilesCommand(BaseCommand):
|
||||
item.setUnlabeled(True)
|
||||
self.labeltool.saveAnnotations(args[0])
|
||||
|
||||
|
||||
class MergeFilesCommand(BaseCommand):
|
||||
"""
|
||||
Merge annotations of two label files and create a new one from it.
|
||||
@@ -202,6 +204,7 @@ class MergeFilesCommand(BaseCommand):
|
||||
|
||||
return an1
|
||||
|
||||
|
||||
def _make_writeable(filename):
|
||||
"""
|
||||
Make sure that the file is writeable. Useful if our source is
|
||||
|
||||
Reference in New Issue
Block a user