1. zhangchunlin
  2. scancopyright

Commits

zhangclb  committed 140101c

fix makedirs "File exists" issue

  • Participants
  • Parent commits 33ca5f7
  • Branches master

Comments (0)

Files changed (1)

File apps/Scan/commands.py

View file
  • Ignore whitespace
         for path in list(ScanPathes.filter(ScanPathes.c.release==True)):
             #print path.path
             dpdst = os.path.join(dpexport,path.path)
-            os.makedirs(dpdst)
+            if not os.path.exists(dpdst):
+                os.makedirs(dpdst)
             dpsrc = os.path.join(settings.SCAN.DIR,path.path)
             cmd = "rsync -av %s/ %s/"%(dpsrc,dpdst)
             print cmd