windows fixes
This commit is contained in:
parent
3a419b12c2
commit
a37a63d8da
4 changed files with 14 additions and 4 deletions
|
|
@ -570,8 +570,12 @@ class Item(db.Model):
|
|||
for f in self.files.all():
|
||||
path = f.fullpath()
|
||||
if os.path.exists(path):
|
||||
os.unlink(path)
|
||||
remove_empty_folders(os.path.dirname(path))
|
||||
try:
|
||||
os.chmod(path, stat.S_IWRITE)
|
||||
os.unlink(path)
|
||||
remove_empty_folders(os.path.dirname(path))
|
||||
except:
|
||||
pass
|
||||
state.db.session.delete(f)
|
||||
user = state.user()
|
||||
if user in self.users:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue