Fmt.
This commit is contained in:
parent
b1a309527a
commit
9feae8df4c
1 changed files with 2 additions and 2 deletions
|
@ -19,13 +19,13 @@ Inspired by https://github.com/herval/org_photos/blob/main/org_photos.rb
|
|||
import argparse
|
||||
from datetime import datetime, timedelta
|
||||
from hashlib import sha256, sha512
|
||||
import os
|
||||
from pathlib import Path
|
||||
import re
|
||||
from shutil import copy2 as copyfile
|
||||
import stat
|
||||
import sys
|
||||
import typing as t
|
||||
import os
|
||||
|
||||
from .util import *
|
||||
|
||||
|
@ -351,7 +351,7 @@ def img_info(p: Path) -> ImgInfo:
|
|||
|
||||
def is_readonly(src: Path) -> bool:
|
||||
statinfo = os.stat(src, dir_fd=None, follow_symlinks=True)
|
||||
if getattr(statinfo, 'st_flags', 0) & stat.UF_IMMUTABLE:
|
||||
if getattr(statinfo, "st_flags", 0) & stat.UF_IMMUTABLE:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
|
Loading…
Reference in a new issue