Permalink
Browse files

movePhoto()

  • Loading branch information...
1 parent 40a0812 commit 0bb8296f99be62ecd8e5966eacda25c8bd415b06 @jcline jcline committed Apr 16, 2012
Showing with 10 additions and 1 deletion.
  1. +9 −0 src/database/fs.py
  2. +1 −1 src/database/photostorage.py
View
@@ -698,3 +698,12 @@ def renamePhoto(self, photo, name):
shutil.copy(fromPath, directory + "/" + name)
shutil.rmtree(fromPath)
+
+ def movePhoto(self, photo, photoset):
+ name = photo.name
+ fromPath = self.generatePhotosetDir(photo.photoset) + "/" + name
+ toPath = self.generatePhotosetDir(photoset) + "/" + name
+
+ shutil.copy(fromPath, toPath)
+ shutil.rmtree(toPath)
+
@@ -28,5 +28,5 @@ def renamePhoto(self, photo, toName):
self.fsm.renamePhoto(photo, toName)
def movePhoto(self, photo, toPhotoset):
- pass
+ self.fsm.movePhoto(photo, toPhotoset)

0 comments on commit 0bb8296

Please sign in to comment.